diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 22:58:06 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 22:58:06 +0000 |
commit | 0f6e64d50511aeab55ed6929d8bc1953b776bb92 (patch) | |
tree | 809e302691a93f939b33e1eff7ccd8925c8a84d7 /clang/lib/Sema/SemaLookup.cpp | |
parent | 9b8f9c3d95c40bbe4e575929d97ad8b3cce7244e (diff) | |
download | bcm5719-llvm-0f6e64d50511aeab55ed6929d8bc1953b776bb92.tar.gz bcm5719-llvm-0f6e64d50511aeab55ed6929d8bc1953b776bb92.zip |
[C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203863
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 4edf80954b4..8e6601c7649 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -3161,10 +3161,9 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result, QualifiedNameLookup, InBaseClass, Consumer, Visited); } } else if (ObjCProtocolDecl *Protocol = dyn_cast<ObjCProtocolDecl>(Ctx)) { - for (ObjCProtocolDecl::protocol_iterator I = Protocol->protocol_begin(), - E = Protocol->protocol_end(); I != E; ++I) { + for (auto *I : Protocol->protocols()) { ShadowContextRAII Shadow(Visited); - LookupVisibleDecls(*I, Result, QualifiedNameLookup, false, Consumer, + LookupVisibleDecls(I, Result, QualifiedNameLookup, false, Consumer, Visited); } } else if (ObjCCategoryDecl *Category = dyn_cast<ObjCCategoryDecl>(Ctx)) { |