r201922 - Per feedback from Aaron Ballman, push cast-to-ObjCProtocolDecl inside handleObjCSuppresProtocolAttr().
Ted Kremenek
kremenek at apple.com
Fri Feb 21 17:06:05 PST 2014
Author: kremenek
Date: Fri Feb 21 19:06:05 2014
New Revision: 201922
URL: http://llvm.org/viewvc/llvm-project?rev=201922&view=rev
Log:
Per feedback from Aaron Ballman, push cast-to-ObjCProtocolDecl inside handleObjCSuppresProtocolAttr().
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=201922&r1=201921&r2=201922&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Fri Feb 21 19:06:05 2014
@@ -1643,9 +1643,9 @@ static void handleAttrWithMessage(Sema &
Attr.getAttributeSpellingListIndex()));
}
-static void handleObjCSuppresProtocolAttr(Sema &S, ObjCProtocolDecl *D,
+static void handleObjCSuppresProtocolAttr(Sema &S, Decl *D,
const AttributeList &Attr) {
- if (!D->isThisDeclarationADefinition()) {
+ if (!cast<ObjCProtocolDecl>(D)->isThisDeclarationADefinition()) {
S.Diag(Attr.getLoc(), diag::err_objc_attr_protocol_requires_definition)
<< Attr.getName() << Attr.getRange();
return;
@@ -4197,7 +4197,7 @@ static void ProcessDeclAttribute(Sema &S
case AttributeList::AT_ObjCRootClass:
handleSimpleAttribute<ObjCRootClassAttr>(S, D, Attr); break;
case AttributeList::AT_ObjCExplicitProtocolImpl:
- handleObjCSuppresProtocolAttr(S, cast<ObjCProtocolDecl>(D), Attr);
+ handleObjCSuppresProtocolAttr(S, D, Attr);
break;
case AttributeList::AT_ObjCRequiresPropertyDefs:
handleSimpleAttribute<ObjCRequiresPropertyDefsAttr>(S, D, Attr); break;
More information about the cfe-commits
mailing list