From: Ted Kremenek Date: Sat, 22 Feb 2014 01:06:05 +0000 (+0000) Subject: Per feedback from Aaron Ballman, push cast-to-ObjCProtocolDecl inside handleObjCSuppr... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=269a49b49b95f84fe4c48850c226a1a03e684772;p=clang Per feedback from Aaron Ballman, push cast-to-ObjCProtocolDecl inside handleObjCSuppresProtocolAttr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201922 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 88cdc756ec..29e4bb7b3e 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1643,9 +1643,9 @@ static void handleAttrWithMessage(Sema &S, Decl *D, Attr.getAttributeSpellingListIndex())); } -static void handleObjCSuppresProtocolAttr(Sema &S, ObjCProtocolDecl *D, +static void handleObjCSuppresProtocolAttr(Sema &S, Decl *D, const AttributeList &Attr) { - if (!D->isThisDeclarationADefinition()) { + if (!cast(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, Scope *scope, Decl *D, case AttributeList::AT_ObjCRootClass: handleSimpleAttribute(S, D, Attr); break; case AttributeList::AT_ObjCExplicitProtocolImpl: - handleObjCSuppresProtocolAttr(S, cast(D), Attr); + handleObjCSuppresProtocolAttr(S, D, Attr); break; case AttributeList::AT_ObjCRequiresPropertyDefs: handleSimpleAttribute(S, D, Attr); break;