summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/MultiplexExternalSemaSource.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-12-19 00:45:41 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-12-19 00:45:41 +0000
commitff7d47a354b7706ea4028ea4b0d0e0e858971b05 (patch)
tree78a366de36742b3ce063e174e2547174b69943d9 /clang/lib/Sema/MultiplexExternalSemaSource.cpp
parentbbdb9f26538f889a042432c9e87407ab472db1bf (diff)
downloadbcm5719-llvm-ff7d47a354b7706ea4028ea4b0d0e0e858971b05.tar.gz
bcm5719-llvm-ff7d47a354b7706ea4028ea4b0d0e0e858971b05.zip
Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as per review discussion in r170365
This does limit these typedefs to being sequences, but no current usage requires them to be contiguous (we could expand this to a more general iterator pair range concept at some point). Also, it'd be nice if SmallVector were constructible directly from an ArrayRef but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the inverse conversion. (& generalizing over all range-like things, while nice, would require some nontrivial SFINAE I haven't thought about yet) llvm-svn: 170482
Diffstat (limited to 'clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--clang/lib/Sema/MultiplexExternalSemaSource.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
index 8e03eb57e33..dca0a3549d0 100644
--- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -84,13 +84,13 @@ CXXBaseSpecifier *MultiplexExternalSemaSource::GetExternalCXXBaseSpecifiers(
DeclContextLookupResult 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++;
+ DeclContext::lookup_result R =
+ Sources[i]->FindExternalVisibleDeclsByName(DC, Name);
+ for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E;
+ ++I) {
+ if (!DeclsFound.HandleRedeclaration(*I))
+ DeclsFound.AddSubsequentDecl(*I);
}
}
return DeclsFound.getLookupResult();
OpenPOWER on IntegriCloud