diff options
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index f4507e3603..37e0892c5c 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -1010,6 +1010,13 @@ void DeclContext::addHiddenDecl(Decl *D) { // update it's class-specific state. if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(this)) Record->addedMember(D); + + // If this is a newly-created (not de-serialized) import declaration, wire + // it in to the list of local import declarations. + if (!D->isFromASTFile()) { + if (ImportDecl *Import = dyn_cast<ImportDecl>(D)) + D->getASTContext().addedLocalImportDecl(Import); + } } void DeclContext::addDecl(Decl *D) { |