diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 20:29:09 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 20:29:09 +0000 |
commit | a49c5064a186c5cfec789fa29c9d502b93541dd6 (patch) | |
tree | 76b9fb4a6f1602bcf76ea4ca8485fbd7ee96ed8e /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | a8fb72428b22f694acdf1b2203c4fc2d70f74456 (diff) | |
download | bcm5719-llvm-a49c5064a186c5cfec789fa29c9d502b93541dd6.tar.gz bcm5719-llvm-a49c5064a186c5cfec789fa29c9d502b93541dd6.zip |
[C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases.
llvm-svn: 203842
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index a4bac8dc66c..0c02e52e67b 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -4852,10 +4852,8 @@ static void AddObjCMethods(ObjCContainerDecl *Container, return; // Add methods in protocols. - for (ObjCInterfaceDecl::protocol_iterator I = IFace->protocol_begin(), - E = IFace->protocol_end(); - I != E; ++I) - AddObjCMethods(*I, WantInstanceMethods, WantKind, SelIdents, + for (auto *I : IFace->protocols()) + AddObjCMethods(I, WantInstanceMethods, WantKind, SelIdents, CurContext, Selectors, AllowSameLength, Results, false); // Add methods in categories. |