[C++11] Replacing ObjCProtocolDecl 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: 203863
This commit is contained in:
Aaron Ballman
2014-03-13 22:58:06 +00:00
parent 9b8f9c3d95
commit 0f6e64d505
13 changed files with 61 additions and 94 deletions

View File

@@ -3487,10 +3487,8 @@ static void AddObjCProperties(ObjCContainerDecl *Container,
// Add properties in referenced protocols.
if (ObjCProtocolDecl *Protocol = dyn_cast<ObjCProtocolDecl>(Container)) {
for (ObjCProtocolDecl::protocol_iterator P = Protocol->protocol_begin(),
PEnd = Protocol->protocol_end();
P != PEnd; ++P)
AddObjCProperties(*P, AllowCategories, AllowNullaryMethods, CurContext,
for (auto *P : Protocol->protocols())
AddObjCProperties(P, AllowCategories, AllowNullaryMethods, CurContext,
AddedProperties, Results);
} else if (ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(Container)){
if (AllowCategories) {