|
@@ -1835,6 +1835,13 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc,
|
|
// FIXME: PushOnScopeChains?
|
|
// FIXME: PushOnScopeChains?
|
|
CurContext->addDecl(CDecl);
|
|
CurContext->addDecl(CDecl);
|
|
|
|
|
|
|
|
+ // Process the attributes before looking at protocols to ensure that the
|
|
|
|
+ // availability attribute is attached to the category to provide availability
|
|
|
|
+ // checking for protocol uses.
|
|
|
|
+ if (AttrList)
|
|
|
|
+ ProcessDeclAttributeList(TUScope, CDecl, AttrList);
|
|
|
|
+ AddPragmaAttributes(TUScope, CDecl);
|
|
|
|
+
|
|
if (NumProtoRefs) {
|
|
if (NumProtoRefs) {
|
|
diagnoseUseOfProtocols(*this, CDecl, (ObjCProtocolDecl*const*)ProtoRefs,
|
|
diagnoseUseOfProtocols(*this, CDecl, (ObjCProtocolDecl*const*)ProtoRefs,
|
|
NumProtoRefs, ProtoLocs);
|
|
NumProtoRefs, ProtoLocs);
|
|
@@ -1846,10 +1853,6 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc,
|
|
NumProtoRefs, Context);
|
|
NumProtoRefs, Context);
|
|
}
|
|
}
|
|
|
|
|
|
- if (AttrList)
|
|
|
|
- ProcessDeclAttributeList(TUScope, CDecl, AttrList);
|
|
|
|
- AddPragmaAttributes(TUScope, CDecl);
|
|
|
|
-
|
|
|
|
CheckObjCDeclScope(CDecl);
|
|
CheckObjCDeclScope(CDecl);
|
|
return ActOnObjCContainerStartDefinition(CDecl);
|
|
return ActOnObjCContainerStartDefinition(CDecl);
|
|
}
|
|
}
|