summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
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