Skip to content
Snippets Groups Projects
Commit 7b183ffd authored by Aaron Ballman's avatar Aaron Ballman
Browse files

Specifying the diagnostic argument through the attribute table generator...

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213193 91177308-0d34-0410-b5e6-96231b3b80d8
parent 906f34cf
No related branches found
No related tags found
No related merge requests found
......@@ -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";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment