summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-13 20:55:22 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-13 20:55:22 +0000
commita9f49e394c8e25c1f6e0693e52a770125f01d7e1 (patch)
treeb0f7235edce127c97920a3c67e678a67cae36834 /clang/lib/AST/ASTContext.cpp
parente937888e1c4eeafba7eab0359e00f5d28da93ecd (diff)
downloadbcm5719-llvm-a9f49e394c8e25c1f6e0693e52a770125f01d7e1.tar.gz
bcm5719-llvm-a9f49e394c8e25c1f6e0693e52a770125f01d7e1.zip
[C++11] Replacing ObjCInterfaceDecl iterators all_referenced_protocol_begin() and all_referenced_protocol_end() with iterator_range all_referenced_protocols(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203848
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 43040b45e90..7d48365f1b1 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1813,9 +1813,7 @@ void ASTContext::CollectInheritedProtocols(const Decl *CDecl,
if (const ObjCInterfaceDecl *OI = dyn_cast<ObjCInterfaceDecl>(CDecl)) {
// We can use protocol_iterator here instead of
// all_referenced_protocol_iterator since we are walking all categories.
- for (ObjCInterfaceDecl::all_protocol_iterator P = OI->all_referenced_protocol_begin(),
- PE = OI->all_referenced_protocol_end(); P != PE; ++P) {
- ObjCProtocolDecl *Proto = (*P);
+ for (auto *Proto : OI->all_referenced_protocols()) {
Protocols.insert(Proto->getCanonicalDecl());
for (ObjCProtocolDecl::protocol_iterator P = Proto->protocol_begin(),
PE = Proto->protocol_end(); P != PE; ++P) {
OpenPOWER on IntegriCloud