From 460fea20dc792a17cbbadfa097140551b5c28e9e Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 13 Mar 2014 20:29:09 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203842 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaCodeComplete.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Sema/SemaCodeComplete.cpp') diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index a4bac8dc66..0c02e52e67 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/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. -- cgit v1.2.3