mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[cxx-interop] Clang member lookup should not look into Swift extensions
Calling `NominalTypeDecl::lookupDirect` triggers deserialization of Swift extensions for the type. `ClangRecordMemberLookup` shouldn't assume it is allowed to deserialize Swift extensions for the given C++ type: there might be extensions which reference the module that is currently being imported, which causes circular request dependency errors.
This commit is contained in:
@@ -184,6 +184,11 @@ public:
|
||||
/// Imports a clang decl directly, rather than looking up its name.
|
||||
virtual Decl *importDeclDirectly(const clang::NamedDecl *decl) = 0;
|
||||
|
||||
/// Imports a clang decl from a base class, cloning it for \param newContext
|
||||
/// if it wasn't cloned for this specific context before.
|
||||
virtual ValueDecl *importBaseMemberDecl(ValueDecl *decl,
|
||||
DeclContext *newContext) = 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