diff options
Diffstat (limited to 'include/clang/AST/DeclLookups.h')
-rw-r--r-- | include/clang/AST/DeclLookups.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/AST/DeclLookups.h b/include/clang/AST/DeclLookups.h index 66d190f429885..b8abe97be1fbc 100644 --- a/include/clang/AST/DeclLookups.h +++ b/include/clang/AST/DeclLookups.h @@ -67,6 +67,8 @@ public: DeclContext::all_lookups_iterator DeclContext::lookups_begin() const { DeclContext *Primary = const_cast<DeclContext*>(this)->getPrimaryContext(); + if (hasExternalVisibleStorage()) + getParentASTContext().getExternalSource()->completeVisibleDeclsMap(Primary); if (StoredDeclsMap *Map = Primary->buildLookup()) return all_lookups_iterator(Map->begin(), Map->end()); return all_lookups_iterator(); @@ -74,6 +76,8 @@ DeclContext::all_lookups_iterator DeclContext::lookups_begin() const { DeclContext::all_lookups_iterator DeclContext::lookups_end() const { DeclContext *Primary = const_cast<DeclContext*>(this)->getPrimaryContext(); + if (hasExternalVisibleStorage()) + getParentASTContext().getExternalSource()->completeVisibleDeclsMap(Primary); if (StoredDeclsMap *Map = Primary->buildLookup()) return all_lookups_iterator(Map->end(), Map->end()); return all_lookups_iterator(); |