mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[6.2][cxx-interop] Fix unqualified name lookup failure
Explanation: C++ interop synthesizes certain forwarding functions in an _ObjC module. This confuses MemberImportVisibility. This patch adds logic to work this around by keeping a mapping between the synthesized and the original function and looks up where the synthesized functions belong to based on the original functions' parent module. Scope: C++ forward interop when MemberImportVisibility is enabled. Issues: rdar://154887575 Original PRs: #82840 Risk: Low, a narrow change makes getModuleContextForNameLookupForCxxDecl more precise, and it is only used with MemberImportVisibility. Testing: Added a compiler test. Reviewers: @egorzhdan, @tshortli, @hnrklssn
This commit is contained in:
committed by
Gabor Horvath
parent
7c12be865e
commit
b51b58db30
@@ -216,6 +216,9 @@ public:
|
||||
DeclContext *newContext,
|
||||
ClangInheritanceInfo inheritance) = 0;
|
||||
|
||||
/// Returnes the original method if \param decl is a clone from a base class
|
||||
virtual ValueDecl *getOriginalForClonedMember(const ValueDecl *decl) = 0;
|
||||
|
||||
/// Emits diagnostics for any declarations named name
|
||||
/// whose direct declaration context is a TU.
|
||||
virtual void diagnoseTopLevelValue(const DeclName &name) = 0;
|
||||
|
||||
Reference in New Issue
Block a user