mirror of https://github.com/microsoft/clang.git
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
This commit is contained in:
parent
906f34cfab
commit
7b183ffd3e
|
@ -991,8 +991,7 @@ def ObjCDesignatedInitializer : Attr {
|
|||
|
||||
def ObjCRuntimeName : Attr {
|
||||
let Spellings = [GNU<"objc_runtime_name">];
|
||||
let Subjects = SubjectList<[ObjCInterface, ObjCProtocol], ErrorDiag,
|
||||
"ExpectedObjectiveCInterfaceOrProtocol">;
|
||||
let Subjects = SubjectList<[ObjCInterface, ObjCProtocol], ErrorDiag>;
|
||||
let Args = [StringArgument<"MetadataName">];
|
||||
let Documentation = [ObjCRuntimeNameDocs];
|
||||
}
|
||||
|
|
|
@ -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