mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix up a bunch of filtering-by-decl-access-path.
Mostly cleanup, a few filled-in FIXMEs to filter out decls that don't match the access path name. Swift SVN r6850
This commit is contained in:
@@ -2132,7 +2132,17 @@ void ModuleFile::getReexportedModules(
|
||||
void ModuleFile::lookupVisibleDecls(Module::AccessPathTy accessPath,
|
||||
VisibleDeclConsumer &consumer,
|
||||
NLKind lookupKind) {
|
||||
// FIXME: Validate against access path.
|
||||
assert(accessPath.size() <= 1 && "can only refer to top-level decls");
|
||||
|
||||
if (!accessPath.empty()) {
|
||||
auto I = TopLevelDecls.find(accessPath.front().first);
|
||||
if (I == TopLevelDecls.end()) return;
|
||||
|
||||
for (auto vd : I->second)
|
||||
consumer.foundDecl(vd);
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto &topLevelEntry : TopLevelDecls) {
|
||||
for (auto &value : topLevelEntry.second)
|
||||
consumer.foundDecl(value);
|
||||
|
||||
Reference in New Issue
Block a user