summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-14 12:55:57 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-14 12:55:57 +0000
commit19a417699fd985cb31eef88e47088d7436f149bf (patch)
treec5a2de1b591629ec6b2fda4880806712ef137079 /clang/lib/AST/ASTContext.cpp
parentf445399870e5d3e70be72db0e5ac6aa4d581d8ca (diff)
downloadbcm5719-llvm-19a417699fd985cb31eef88e47088d7436f149bf.tar.gz
bcm5719-llvm-19a417699fd985cb31eef88e47088d7436f149bf.zip
[C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203922
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 514a4e15b15..1f331ce5482 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1827,9 +1827,7 @@ void ASTContext::CollectInheritedProtocols(const Decl *CDecl,
SD = SD->getSuperClass();
}
} else if (const ObjCCategoryDecl *OC = dyn_cast<ObjCCategoryDecl>(CDecl)) {
- for (ObjCCategoryDecl::protocol_iterator P = OC->protocol_begin(),
- PE = OC->protocol_end(); P != PE; ++P) {
- ObjCProtocolDecl *Proto = (*P);
+ for (auto *Proto : OC->protocols()) {
Protocols.insert(Proto->getCanonicalDecl());
for (const auto *P : Proto->protocols())
CollectInheritedProtocols(P, Protocols);
OpenPOWER on IntegriCloud