Specifying the diagnostic argument through the attribute table generator instead...
authorAaron Ballman <aaron@aaronballman.com>
Wed, 16 Jul 2014 20:28:10 +0000 (20:28 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 16 Jul 2014 20:28:10 +0000 (20:28 +0000)
No new tests required as this is covered by existing tests.

llvm-svn: 213193

clang/include/clang/Basic/Attr.td
clang/utils/TableGen/ClangAttrEmitter.cpp

index 11ad93a..640cd4d 100644 (file)
@@ -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 {
index 7ae8b74..1790dcb 100644 (file)
@@ -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";
   }