-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Allow import-as-member for functions declared within a namespace #82579
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
Conversation
@swift-ci please smoke test |
0efd534
to
9603bd2
Compare
@swift-ci please smoke test |
@swift-ci please test Windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, I have one question about the naming.
lib/ClangImporter/ImportDecl.cpp
Outdated
@@ -10231,7 +10231,9 @@ ClangImporter::Implementation::importDeclContextOf( | |||
|
|||
// If the declaration was not global to start with, we're done. | |||
bool isGlobal = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think this code is a bit confusing. isGlobal
to me suggest something like DeclContext::isFileContext
. But the fact that we also make this condition dependent on the EffectiveClangContext suggests me that the meaning of this is a bit more elaborate. Should this be something like isRenamedGlobal
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Renamed it to isRenamedGlobal
.
…namespace This makes it possible to use trigger import-as-member for C++ functions declared within namespaces. Previously only functions declared at the file level were supported. rdar://138930205
9603bd2
to
d3dc17a
Compare
@swift-ci please smoke test |
This makes it possible to use trigger import-as-member for C++ functions declared within namespaces. Previously only functions declared at the file level were supported.
rdar://138930205