"types and namespaces|Objective-C interfaces|methods and properties|"
"struct or union|struct, union or class|types|"
"Objective-C instance methods|init methods of interface declarations|"
- "variables, functions and classes}1">,
+ "variables, functions and classes|Objective-C protocols}1">,
InGroup<IgnoredAttributes>;
def err_attribute_wrong_decl_type : Error<
"%0 attribute only applies to %select{functions|unions|"
"types and namespaces|Objective-C interfaces|methods and properties|"
"struct or union|struct, union or class|types|"
"Objective-C instance methods|init methods of interface declarations|"
- "variables, functions and classes}1">;
+ "variables, functions and classes|Objective-C protocols}1">;
def warn_type_attribute_wrong_type : Warning<
"'%0' only applies to %select{function|pointer|"
"Objective-C object or block pointer}1 types; type here is %2">,
ExpectedType,
ExpectedObjCInstanceMethod,
ExpectedObjCInterfaceDeclInitMethod,
- ExpectedFunctionVariableOrClass
+ ExpectedFunctionVariableOrClass,
+ ExpectedObjectiveCProtocol
};
} // end namespace clang
Namespace = 1U << 11,
FuncTemplate = 1U << 12,
Field = 1U << 13,
- CXXMethod = 1U << 14
+ CXXMethod = 1U << 14,
+ ObjCProtocol = 1U << 15
};
uint32_t SubMask = 0;
.Case("ObjCProperty", ObjCProp)
.Case("Record", GenericRecord)
.Case("ObjCInterface", ObjCInterface)
+ .Case("ObjCProtocol", ObjCProtocol)
.Case("Block", Block)
.Case("CXXRecord", Class)
.Case("Namespace", Namespace)
case ObjCMethod: return "ExpectedMethod";
case Type: return "ExpectedType";
case ObjCInterface: return "ExpectedObjectiveCInterface";
+ case ObjCProtocol: return "ExpectedObjectiveCProtocol";
// "GenericRecord" means struct, union or class; check the language options
// and if not compiling for C++, strip off the class part. Note that this