diff options
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 8e6601c7649..c05de38dd80 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -3167,10 +3167,9 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result, Visited); } } else if (ObjCCategoryDecl *Category = dyn_cast<ObjCCategoryDecl>(Ctx)) { - for (ObjCCategoryDecl::protocol_iterator I = Category->protocol_begin(), - E = Category->protocol_end(); I != E; ++I) { + for (auto *I : Category->protocols()) { ShadowContextRAII Shadow(Visited); - LookupVisibleDecls(*I, Result, QualifiedNameLookup, false, Consumer, + LookupVisibleDecls(I, Result, QualifiedNameLookup, false, Consumer, Visited); } |