diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 15:02:45 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 15:02:45 +0000 |
commit | d85eff49a3c0e2365b3457c762d4bdb72f82800f (patch) | |
tree | 614de878d0541998690a9ec44e7dc1b42103ff84 /clang/lib/AST/ASTContext.cpp | |
parent | 5c77e39f2d867e4862a557aab6d81f0d6d8165c4 (diff) | |
download | bcm5719-llvm-d85eff49a3c0e2365b3457c762d4bdb72f82800f.tar.gz bcm5719-llvm-d85eff49a3c0e2365b3457c762d4bdb72f82800f.zip |
[C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203930
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 1f331ce5482..bc1f3a821cd 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4936,22 +4936,14 @@ ASTContext::getObjCPropertyImplDeclForPropertyDecl( return 0; if (const ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(Container)) { - for (ObjCCategoryImplDecl::propimpl_iterator - i = CID->propimpl_begin(), e = CID->propimpl_end(); - i != e; ++i) { - ObjCPropertyImplDecl *PID = *i; - if (PID->getPropertyDecl() == PD) - return PID; - } + for (auto *PID : CID->property_impls()) + if (PID->getPropertyDecl() == PD) + return PID; } else { const ObjCImplementationDecl *OID=cast<ObjCImplementationDecl>(Container); - for (ObjCCategoryImplDecl::propimpl_iterator - i = OID->propimpl_begin(), e = OID->propimpl_end(); - i != e; ++i) { - ObjCPropertyImplDecl *PID = *i; + for (auto *PID : OID->property_impls()) if (PID->getPropertyDecl() == PD) return PID; - } } return 0; } |