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;
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;