mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST printing / getDisplayDecls: correctly form the access path to the module
Removes (harmless) stderr output in tests like: error: no submodule named 'fooFunc1' in module 'FooClangModule' Swift SVN r11200
This commit is contained in:
@@ -620,7 +620,6 @@ void ModuleFile::getImportDecls(SmallVectorImpl<Decl *> &Results) {
|
|||||||
auto ScopeID = Ctx.getIdentifier(ScopePath);
|
auto ScopeID = Ctx.getIdentifier(ScopePath);
|
||||||
assert(!ScopeID.empty() &&
|
assert(!ScopeID.empty() &&
|
||||||
"invalid decl name (non-top-level decls not supported)");
|
"invalid decl name (non-top-level decls not supported)");
|
||||||
AccessPath.push_back({ ScopeID, SourceLoc() });
|
|
||||||
|
|
||||||
Module *M = Ctx.getModule(AccessPath);
|
Module *M = Ctx.getModule(AccessPath);
|
||||||
if (!M) {
|
if (!M) {
|
||||||
@@ -636,6 +635,8 @@ void ModuleFile::getImportDecls(SmallVectorImpl<Decl *> &Results) {
|
|||||||
"deserialized imports should not be ambigous");
|
"deserialized imports should not be ambigous");
|
||||||
Kind = *FoundKind;
|
Kind = *FoundKind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AccessPath.push_back({ ScopeID, SourceLoc() });
|
||||||
}
|
}
|
||||||
|
|
||||||
ImportDecls.push_back(ImportDecl::create(
|
ImportDecls.push_back(ImportDecl::create(
|
||||||
|
|||||||
Reference in New Issue
Block a user