summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-13 20:29:09 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-13 20:29:09 +0000
commita49c5064a186c5cfec789fa29c9d502b93541dd6 (patch)
tree76b9fb4a6f1602bcf76ea4ca8485fbd7ee96ed8e /clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
parenta8fb72428b22f694acdf1b2203c4fc2d70f74456 (diff)
downloadbcm5719-llvm-a49c5064a186c5cfec789fa29c9d502b93541dd6.tar.gz
bcm5719-llvm-a49c5064a186c5cfec789fa29c9d502b93541dd6.zip
[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. llvm-svn: 203842
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
index b11b1d9c0d6..ed0e460b3a5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
@@ -257,11 +257,8 @@ void IvarInvalidationCheckerImpl::containsInvalidationMethod(
if (const ObjCInterfaceDecl *InterfD = dyn_cast<ObjCInterfaceDecl>(D)) {
// Visit all protocols.
- for (ObjCInterfaceDecl::protocol_iterator
- I = InterfD->protocol_begin(),
- E = InterfD->protocol_end(); I != E; ++I) {
- containsInvalidationMethod((*I)->getDefinition(), OutInfo, Partial);
- }
+ for (const auto *I : InterfD->protocols())
+ containsInvalidationMethod(I->getDefinition(), OutInfo, Partial);
// Visit all categories in case the invalidation method is declared in
// a category.
@@ -278,9 +275,9 @@ void IvarInvalidationCheckerImpl::containsInvalidationMethod(
// If protocol, check all parent protocols.
if (const ObjCProtocolDecl *ProtD = dyn_cast<ObjCProtocolDecl>(D)) {
- for (ObjCInterfaceDecl::protocol_iterator
- I = ProtD->protocol_begin(),
- E = ProtD->protocol_end(); I != E; ++I) {
+ for (ObjCProtocolDecl::protocol_iterator I = ProtD->protocol_begin(),
+ E = ProtD->protocol_end();
+ I != E; ++I) {
containsInvalidationMethod((*I)->getDefinition(), OutInfo, Partial);
}
return;
OpenPOWER on IntegriCloud