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 | 3bc93e3124ad5e7191c4a12dc981c8ee53578193 (patch) | |
tree | 473bface3adcd2064712462246a506969b0284d8 /lib/AST/DeclBase.cpp | |
parent | 8a68da12c71efeeaca0ed24c39288a2117d07f9d (diff) |
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170482 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 883e3fd698..5dccaac020 100644 --- a/lib/AST/DeclBase.cpp +++ b/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())); } //===----------------------------------------------------------------------===// |