diff options
Diffstat (limited to 'lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r-- | lib/Sema/MultiplexExternalSemaSource.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/lib/Sema/MultiplexExternalSemaSource.cpp b/lib/Sema/MultiplexExternalSemaSource.cpp index f930fb348a25..d85624ba6f64 100644 --- a/lib/Sema/MultiplexExternalSemaSource.cpp +++ b/lib/Sema/MultiplexExternalSemaSource.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// #include "clang/Sema/MultiplexExternalSemaSource.h" - #include "clang/AST/DeclContextInternals.h" #include "clang/Sema/Lookup.h" @@ -82,19 +81,12 @@ CXXBaseSpecifier *MultiplexExternalSemaSource::GetExternalCXXBaseSpecifiers( return 0; } -DeclContextLookupResult MultiplexExternalSemaSource:: +bool MultiplexExternalSemaSource:: FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) { - StoredDeclsList DeclsFound; - DeclContextLookupResult lookup; - for(size_t i = 0; i < Sources.size(); ++i) { - lookup = Sources[i]->FindExternalVisibleDeclsByName(DC, Name); - while(lookup.first != lookup.second) { - if (!DeclsFound.HandleRedeclaration(*lookup.first)) - DeclsFound.AddSubsequentDecl(*lookup.first); - lookup.first++; - } - } - return DeclsFound.getLookupResult(); + bool AnyDeclsFound = false; + for (size_t i = 0; i < Sources.size(); ++i) + AnyDeclsFound |= Sources[i]->FindExternalVisibleDeclsByName(DC, Name); + return AnyDeclsFound; } void MultiplexExternalSemaSource::completeVisibleDeclsMap(const DeclContext *DC){ @@ -201,6 +193,12 @@ void MultiplexExternalSemaSource::ReadKnownNamespaces( for(size_t i = 0; i < Sources.size(); ++i) Sources[i]->ReadKnownNamespaces(Namespaces); } + +void MultiplexExternalSemaSource::ReadUndefinedButUsed( + llvm::DenseMap<NamedDecl*, SourceLocation> &Undefined){ + for(size_t i = 0; i < Sources.size(); ++i) + Sources[i]->ReadUndefinedButUsed(Undefined); +} bool MultiplexExternalSemaSource::LookupUnqualified(LookupResult &R, Scope *S){ for(size_t i = 0; i < Sources.size(); ++i) @@ -239,10 +237,10 @@ void MultiplexExternalSemaSource::ReadDynamicClasses( Sources[i]->ReadDynamicClasses(Decls); } -void MultiplexExternalSemaSource::ReadLocallyScopedExternalDecls( +void MultiplexExternalSemaSource::ReadLocallyScopedExternCDecls( SmallVectorImpl<NamedDecl*> &Decls) { for(size_t i = 0; i < Sources.size(); ++i) - Sources[i]->ReadLocallyScopedExternalDecls(Decls); + Sources[i]->ReadLocallyScopedExternCDecls(Decls); } void MultiplexExternalSemaSource::ReadReferencedSelectors( |