mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Clang importer] Lazily load all named members with a matching base name.
When loading the named members for a given name, we want to load all of the members with that base name... not only the ones that match the full name, because the lookup table is indexed by base name and filtering too early drops candidates. Fixes rdar://problem/36085994.
This commit is contained in:
@@ -1793,7 +1793,7 @@ void ModuleFile::loadObjCMethods(
|
||||
}
|
||||
|
||||
Optional<TinyPtrVector<ValueDecl *>>
|
||||
ModuleFile::loadNamedMembers(const IterableDeclContext *IDC, DeclName N,
|
||||
ModuleFile::loadNamedMembers(const IterableDeclContext *IDC, DeclBaseName N,
|
||||
uint64_t contextData) {
|
||||
PrettyStackTraceDecl trace("loading members for", IDC->getDecl());
|
||||
|
||||
@@ -1801,7 +1801,7 @@ ModuleFile::loadNamedMembers(const IterableDeclContext *IDC, DeclName N,
|
||||
assert(DeclMemberNames);
|
||||
|
||||
TinyPtrVector<ValueDecl *> results;
|
||||
auto i = DeclMemberNames->find(N.getBaseName());
|
||||
auto i = DeclMemberNames->find(N);
|
||||
if (i == DeclMemberNames->end())
|
||||
return results;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user