summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-07 13:44:44 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-07 13:44:44 +0000
commit63ab760ebe0dadb44c055b75177eae57286e568a (patch)
treed6052ae7189cef4813c27148c663f62b3636346c /clang/lib/Sema/SemaLookup.cpp
parent18adbc361a0e97a49960f0261dd98075584271fc (diff)
downloadbcm5719-llvm-63ab760ebe0dadb44c055b75177eae57286e568a.tar.gz
bcm5719-llvm-63ab760ebe0dadb44c055b75177eae57286e568a.zip
[C++11] Updating getUsingDirectives to use iterator_range instead of a std::pair.
llvm-svn: 203239
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 059bc1cae73..5c66f077c82 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -153,9 +153,7 @@ namespace {
void addUsingDirectives(DeclContext *DC, DeclContext *EffectiveDC) {
SmallVector<DeclContext*,4> queue;
while (true) {
- DeclContext::udir_iterator I, End;
- for (std::tie(I, End) = DC->getUsingDirectives(); I != End; ++I) {
- UsingDirectiveDecl *UD = *I;
+ for (auto UD : DC->getUsingDirectives()) {
DeclContext *NS = UD->getNominatedNamespace();
if (visited.insert(NS)) {
addUsingDirective(UD, EffectiveDC);
@@ -1515,8 +1513,8 @@ static bool LookupQualifiedNameInUsingDirectives(Sema &S, LookupResult &R,
continue;
}
- for (std::tie(I, E) = ND->getUsingDirectives(); I != E; ++I) {
- NamespaceDecl *Nom = (*I)->getNominatedNamespace();
+ for (auto I : ND->getUsingDirectives()) {
+ NamespaceDecl *Nom = I->getNominatedNamespace();
if (Visited.insert(Nom))
Queue.push_back(Nom);
}
@@ -3085,9 +3083,8 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result,
// Traverse using directives for qualified name lookup.
if (QualifiedNameLookup) {
ShadowContextRAII Shadow(Visited);
- DeclContext::udir_iterator I, E;
- for (std::tie(I, E) = Ctx->getUsingDirectives(); I != E; ++I) {
- LookupVisibleDecls((*I)->getNominatedNamespace(), Result,
+ for (auto I : Ctx->getUsingDirectives()) {
+ LookupVisibleDecls(I->getNominatedNamespace(), Result,
QualifiedNameLookup, InBaseClass, Consumer, Visited);
}
}
OpenPOWER on IntegriCloud