]> granicus.if.org Git - clang/commitdiff
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213193 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 11ad93a06b3591a3f537164103a590d6d54019d9..640cd4dd40aa159ab16862cb4d997ae6e76c3df8 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 7ae8b74765f3d48c5ffc4239a771a92b04059279..1790dcbd8d3312aa31bcd7c3c7dd69bc0226fccf 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";
   }