summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-10-22 05:00:01 +0000
committerCraig Topper <craig.topper@gmail.com>2015-10-22 05:00:01 +0000
commit0f723bb90b85901487672cf74843f10797ff6f29 (patch)
treea7d4af3ee0e618a6f120ff74319e9413c27cb443 /clang/lib/Sema/SemaDeclObjC.cpp
parentb5518246b25cf6f3fd8ccc2aaef8b943ae292f9c (diff)
downloadbcm5719-llvm-0f723bb90b85901487672cf74843f10797ff6f29.tar.gz
bcm5719-llvm-0f723bb90b85901487672cf74843f10797ff6f29.zip
Convert ActOnForwardProtocolDeclaration to take an ArrayRef and use a range-based for loop. NFC
llvm-svn: 250990
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 163976bd1e7..5b402e5f6ed 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -1675,17 +1675,16 @@ void Sema::DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT,
/// ActOnForwardProtocolDeclaration - Handle \@protocol foo;
Sema::DeclGroupPtrTy
Sema::ActOnForwardProtocolDeclaration(SourceLocation AtProtocolLoc,
- const IdentifierLocPair *IdentList,
- unsigned NumElts,
+ ArrayRef<IdentifierLocPair> IdentList,
AttributeList *attrList) {
SmallVector<Decl *, 8> DeclsInGroup;
- for (unsigned i = 0; i != NumElts; ++i) {
- IdentifierInfo *Ident = IdentList[i].first;
- ObjCProtocolDecl *PrevDecl = LookupProtocol(Ident, IdentList[i].second,
+ for (const IdentifierLocPair &IdentPair : IdentList) {
+ IdentifierInfo *Ident = IdentPair.first;
+ ObjCProtocolDecl *PrevDecl = LookupProtocol(Ident, IdentPair.second,
ForRedeclaration);
ObjCProtocolDecl *PDecl
= ObjCProtocolDecl::Create(Context, CurContext, Ident,
- IdentList[i].second, AtProtocolLoc,
+ IdentPair.second, AtProtocolLoc,
PrevDecl);
PushOnScopeChains(PDecl, TUScope);
OpenPOWER on IntegriCloud