diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-12-19 00:45:41 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-12-19 00:45:41 +0000 |
commit | ff7d47a354b7706ea4028ea4b0d0e0e858971b05 (patch) | |
tree | 78a366de36742b3ce063e174e2547174b69943d9 /clang/lib/AST/DeclBase.cpp | |
parent | bbdb9f26538f889a042432c9e87407ab472db1bf (diff) | |
download | bcm5719-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/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 883e3fd6980..5dccaac0205 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -1206,7 +1206,7 @@ void DeclContext::localUncachedLookup(DeclarationName Name, // the results. if (!hasExternalVisibleStorage() && !hasExternalLexicalStorage() && Name) { lookup_result LookupResults = lookup(Name); - Results.insert(Results.end(), LookupResults.first, LookupResults.second); + Results.insert(Results.end(), LookupResults.begin(), LookupResults.end()); return; } @@ -1216,8 +1216,8 @@ void DeclContext::localUncachedLookup(DeclarationName Name, StoredDeclsMap::iterator Pos = Map->find(Name); if (Pos != Map->end()) { Results.insert(Results.end(), - Pos->second.getLookupResult().first, - Pos->second.getLookupResult().second); + Pos->second.getLookupResult().begin(), + Pos->second.getLookupResult().end()); return; } } @@ -1369,8 +1369,8 @@ DeclContext::getUsingDirectives() const { // FIXME: Use something more efficient than normal lookup for using // directives. In C++, using directives are looked up more than anything else. lookup_const_result Result = lookup(UsingDirectiveDecl::getName()); - return udir_iterator_range(reinterpret_cast<udir_iterator>(Result.first), - reinterpret_cast<udir_iterator>(Result.second)); + return udir_iterator_range(reinterpret_cast<udir_iterator>(Result.begin()), + reinterpret_cast<udir_iterator>(Result.end())); } //===----------------------------------------------------------------------===// |