rename getProtocols -> getProtocol, as it only returns a single
protocol. Simplify some code to use unconditional form of the
protocol access list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53832 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 13f7ff9..9813acb 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -654,13 +654,10 @@
return new ObjCPropertyRefExpr(PD, PD->getType(), MemberLoc, BaseExpr);
// Lastly, check protocols on qualified interfaces.
- if (const ObjCQualifiedInterfaceType *QIT =
- dyn_cast<ObjCQualifiedInterfaceType>(IFTy)) {
- for (unsigned i = 0; i != QIT->getNumProtocols(); ++i)
- if (ObjCPropertyDecl *PD =
- QIT->getProtocols(i)->FindPropertyDeclaration(&Member))
- return new ObjCPropertyRefExpr(PD, PD->getType(), MemberLoc,BaseExpr);
- }
+ for (ObjCInterfaceType::qual_iterator I = IFTy->qual_begin(),
+ E = IFTy->qual_end(); I != E; ++I)
+ if (ObjCPropertyDecl *PD = (*I)->FindPropertyDeclaration(&Member))
+ return new ObjCPropertyRefExpr(PD, PD->getType(), MemberLoc, BaseExpr);
}
// Handle 'field access' to vectors, such as 'V.xx'.