diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 18:47:37 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 18:47:37 +0000 |
commit | dc4bea46763b5a8b7656baa24034edc9941a0aed (patch) | |
tree | c372e891f9847b780b3c52ae7abdf38611d8ad29 /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 8d62008ecb3edd841341789112a0fcab587beff5 (diff) | |
download | bcm5719-llvm-dc4bea46763b5a8b7656baa24034edc9941a0aed.tar.gz bcm5719-llvm-dc4bea46763b5a8b7656baa24034edc9941a0aed.zip |
[C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() with iterator_range props(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203830
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index bd50cd289cf..eb094b56253 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -2680,10 +2680,8 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, // ProcessPropertyDecl is responsible for diagnosing conflicts with any // user-defined setter/getter. It also synthesizes setter/getter methods // and adds them to the DeclContext and global method pools. - for (ObjCContainerDecl::prop_iterator I = CDecl->prop_begin(), - E = CDecl->prop_end(); - I != E; ++I) - ProcessPropertyDecl(*I, CDecl); + for (auto *I : CDecl->props()) + ProcessPropertyDecl(I, CDecl); CDecl->setAtEndRange(AtEnd); } if (ObjCImplementationDecl *IC=dyn_cast<ObjCImplementationDecl>(ClassDecl)) { @@ -2698,9 +2696,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, Ext = IDecl->visible_extensions_begin(), ExtEnd = IDecl->visible_extensions_end(); Ext != ExtEnd; ++Ext) { - for (ObjCContainerDecl::prop_iterator I = Ext->prop_begin(), - E = Ext->prop_end(); I != E; ++I) { - ObjCPropertyDecl *Property = *I; + for (const auto *Property : Ext->props()) { // Skip over properties declared @dynamic if (const ObjCPropertyImplDecl *PIDecl = IC->FindPropertyImplDecl(Property->getIdentifier())) |