forked from OSchip/llvm-project
Specifying the diagnostic argument through the attribute table generator instead of having to enter it manually as part of the attribute subject list. This only affects attributes appertaining to ObjC interfaces and protocols.
No new tests required as this is covered by existing tests. llvm-svn: 213193
This commit is contained in:
parent
1e7facdf20
commit
173361e7e0
|
@ -990,11 +990,10 @@ def ObjCDesignatedInitializer : Attr {
|
|||
}
|
||||
|
||||
def ObjCRuntimeName : Attr {
|
||||
let Spellings = [GNU<"objc_runtime_name">];
|
||||
let Subjects = SubjectList<[ObjCInterface, ObjCProtocol], ErrorDiag,
|
||||
"ExpectedObjectiveCInterfaceOrProtocol">;
|
||||
let Args = [StringArgument<"MetadataName">];
|
||||
let Documentation = [ObjCRuntimeNameDocs];
|
||||
let Spellings = [GNU<"objc_runtime_name">];
|
||||
let Subjects = SubjectList<[ObjCInterface, ObjCProtocol], ErrorDiag>;
|
||||
let Args = [StringArgument<"MetadataName">];
|
||||
let Documentation = [ObjCRuntimeNameDocs];
|
||||
}
|
||||
|
||||
def OptimizeNone : InheritableAttr {
|
||||
|
|
|
@ -2154,6 +2154,8 @@ static std::string CalculateDiagnostic(const Record &S) {
|
|||
"ExpectedVariableOrFunction)";
|
||||
|
||||
case ObjCMethod | ObjCProp: return "ExpectedMethodOrProperty";
|
||||
case ObjCProtocol | ObjCInterface:
|
||||
return "ExpectedObjectiveCInterfaceOrProtocol";
|
||||
case Field | Var: return "ExpectedFieldOrGlobalVar";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue