diff options
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
| -rw-r--r-- | clang/lib/AST/DeclBase.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 1c41e5a659f..8020916a6ce 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -975,6 +975,12 @@ void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D) {      CreateStoredDeclsMap(*C);    } +  // If there is an external AST source, load any declarations it knows about +  // with this declaration's name. +  if (ExternalASTSource *Source = getParentASTContext().getExternalSource()) +    if (hasExternalVisibleStorage()) +      Source->FindExternalVisibleDeclsByName(this, D->getDeclName()); +    // Insert this declaration into the map.    StoredDeclsList &DeclNameEntries = (*LookupPtr)[D->getDeclName()];    if (DeclNameEntries.isNull()) { | 

