diff options
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 7 |
2 files changed, 4 insertions, 9 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. diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 4c203d3ece8..d918aeca15b 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -222,11 +222,8 @@ Decl *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, if (FoundInSuper) { // Also compare the property against a property in our protocols. - for (ObjCInterfaceDecl::protocol_iterator - P = CurrentInterfaceDecl->protocol_begin(), - PEnd = CurrentInterfaceDecl->protocol_end(); - P != PEnd; ++P) { - CheckPropertyAgainstProtocol(*this, Res, *P, KnownProtos); + for (auto *P : CurrentInterfaceDecl->protocols()) { + CheckPropertyAgainstProtocol(*this, Res, P, KnownProtos); } } else { // Slower path: look in all protocols we referenced. |