Skip to content

Allow CoreFoundation to declare CGFloat #40001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4837,6 +4837,7 @@ bool ASTContext::isTypeBridgedInExternalModule(
// bridging implementations of CG types appear in the Foundation
// module.
nominal->getParentModule()->getName() == Id_CoreGraphics ||
nominal->getParentModule()->getName() == Id_CoreFoundation ||
// CoreMedia is a dependency of AVFoundation, but the bridged
// NSValue implementations for CMTime, CMTimeRange, and
// CMTimeMapping are provided by AVFoundation, and AVFoundation
Expand Down
3 changes: 2 additions & 1 deletion lib/AST/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,8 @@ bool TypeBase::isCGFloatType() {
// On macOS `CGFloat` is part of a `CoreGraphics` module,
// but on Linux it could be found in `Foundation`.
return (module->getName().is("CoreGraphics") ||
module->getName().is("Foundation")) &&
module->getName().is("Foundation") ||
module->getName().is("CoreFoundation")) &&
NTD->getName().is("CGFloat");
}

Expand Down