From 83731469a1be2f81b483a37c8c12739a8fb153c5 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 17 Mar 2014 16:14:00 +0000 Subject: [C++11] Replacing ObjCObjectPointerType iterators qual_begin() and qual_end() with iterator_range quals(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204048 --- clang/lib/Sema/SemaExprMember.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'clang/lib/Sema/SemaExprMember.cpp') diff --git a/clang/lib/Sema/SemaExprMember.cpp b/clang/lib/Sema/SemaExprMember.cpp index 4e9d250d4a4..9f1ac516ea9 100644 --- a/clang/lib/Sema/SemaExprMember.cpp +++ b/clang/lib/Sema/SemaExprMember.cpp @@ -398,25 +398,22 @@ static Decl *FindGetterSetterNameDecl(const ObjCObjectPointerType *QIdTy, ASTContext &Context) { // Check protocols on qualified interfaces. Decl *GDecl = 0; - for (ObjCObjectPointerType::qual_iterator I = QIdTy->qual_begin(), - E = QIdTy->qual_end(); I != E; ++I) { + for (const auto *I : QIdTy->quals()) { if (Member) - if (ObjCPropertyDecl *PD = (*I)->FindPropertyDeclaration(Member)) { + if (ObjCPropertyDecl *PD = I->FindPropertyDeclaration(Member)) { GDecl = PD; break; } // Also must look for a getter or setter name which uses property syntax. - if (ObjCMethodDecl *OMD = (*I)->getInstanceMethod(Sel)) { + if (ObjCMethodDecl *OMD = I->getInstanceMethod(Sel)) { GDecl = OMD; break; } } if (!GDecl) { - for (ObjCObjectPointerType::qual_iterator I = QIdTy->qual_begin(), - E = QIdTy->qual_end(); I != E; ++I) { + for (const auto *I : QIdTy->quals()) { // Search in the protocol-qualifier list of current protocol. - GDecl = FindGetterSetterNameDeclFromProtocolList(*I, Member, Sel, - Context); + GDecl = FindGetterSetterNameDeclFromProtocolList(I, Member, Sel, Context); if (GDecl) return GDecl; } -- cgit v1.2.3