diff options
Diffstat (limited to 'clang/lib/Rewrite/Frontend/RewriteObjC.cpp')
-rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteObjC.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp index 64f55ad439a..32c3477fa60 100644 --- a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp @@ -980,9 +980,8 @@ void RewriteObjC::RewriteCategoryDecl(ObjCCategoryDecl *CatDecl) { // FIXME: handle category headers that are declared across multiple lines. ReplaceText(LocStart, 0, "// "); - for (ObjCCategoryDecl::prop_iterator I = CatDecl->prop_begin(), - E = CatDecl->prop_end(); I != E; ++I) - RewriteProperty(*I); + for (auto *I : CatDecl->props()) + RewriteProperty(I); for (ObjCCategoryDecl::instmeth_iterator I = CatDecl->instmeth_begin(), E = CatDecl->instmeth_end(); @@ -1014,9 +1013,8 @@ void RewriteObjC::RewriteProtocolDecl(ObjCProtocolDecl *PDecl) { I != E; ++I) RewriteMethodDeclaration(*I); - for (ObjCInterfaceDecl::prop_iterator I = PDecl->prop_begin(), - E = PDecl->prop_end(); I != E; ++I) - RewriteProperty(*I); + for (auto *I : PDecl->props()) + RewriteProperty(I); // Lastly, comment out the @end. SourceLocation LocEnd = PDecl->getAtEndRange().getBegin(); @@ -1245,9 +1243,8 @@ void RewriteObjC::RewriteInterfaceDecl(ObjCInterfaceDecl *ClassDecl) { } RewriteObjCInternalStruct(ClassDecl, ResultStr); - for (ObjCInterfaceDecl::prop_iterator I = ClassDecl->prop_begin(), - E = ClassDecl->prop_end(); I != E; ++I) - RewriteProperty(*I); + for (auto *I : ClassDecl->props()) + RewriteProperty(I); for (ObjCInterfaceDecl::instmeth_iterator I = ClassDecl->instmeth_begin(), E = ClassDecl->instmeth_end(); I != E; ++I) |