Skip to content

Commit 09f160a

Browse files
authored
Merge pull request #40001 from salinas-miguel/cf-cgfloat
Allow CoreFoundation to declare CGFloat
2 parents 367b4c1 + 055edaf commit 09f160a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4859,6 +4859,7 @@ bool ASTContext::isTypeBridgedInExternalModule(
48594859
// bridging implementations of CG types appear in the Foundation
48604860
// module.
48614861
nominal->getParentModule()->getName() == Id_CoreGraphics ||
4862+
nominal->getParentModule()->getName() == Id_CoreFoundation ||
48624863
// CoreMedia is a dependency of AVFoundation, but the bridged
48634864
// NSValue implementations for CMTime, CMTimeRange, and
48644865
// CMTimeMapping are provided by AVFoundation, and AVFoundation

lib/AST/Type.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,8 @@ bool TypeBase::isCGFloatType() {
826826
// On macOS `CGFloat` is part of a `CoreGraphics` module,
827827
// but on Linux it could be found in `Foundation`.
828828
return (module->getName().is("CoreGraphics") ||
829-
module->getName().is("Foundation")) &&
829+
module->getName().is("Foundation") ||
830+
module->getName().is("CoreFoundation")) &&
830831
NTD->getName().is("CGFloat");
831832
}
832833

0 commit comments

Comments
 (0)