]> granicus.if.org Git - clang/commitdiff
err_attribute_missing_parameter_name has been replaced by err_attribute_argument_type.
authorAaron Ballman <aaron@aaronballman.com>
Tue, 30 Jul 2013 14:29:12 +0000 (14:29 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 30 Jul 2013 14:29:12 +0000 (14:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187420 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp
test/Sema/attr-mode.c

index a8292a85e718df305b05f9d0374c5460ffc796e3..5fe82acf16ca0ef8b021f432164d951ce807c038 100644 (file)
@@ -1765,8 +1765,6 @@ def err_suppress_autosynthesis : Error<
   "to a class declaration">;
 def err_attribute_too_few_arguments : Error<
   "attribute takes at least %0 argument%s0">;
-def err_attribute_missing_parameter_name : Error<
-  "attribute requires unquoted parameter">;
 def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">;
 def err_attribute_bad_neon_vector_size : Error<
   "Neon vector size must be 64 or 128 bits">;
index d89365c20803092190cabcf627659d8a9c88f05a..d5844f4dbc5021250f802fb1d076015e8d0d8555 100644 (file)
@@ -3514,7 +3514,8 @@ static void handleModeAttr(Sema &S, Decl *D, const AttributeList &Attr) {
 
   IdentifierInfo *Name = Attr.getParameterName();
   if (!Name) {
-    S.Diag(Attr.getLoc(), diag::err_attribute_missing_parameter_name);
+    S.Diag(Attr.getLoc(), diag::err_attribute_argument_type) << Attr.getName()
+      << AANT_ArgumentIdentifier;
     return;
   }
 
index f8cc4dc64860d01cd8d0d848ff1e7935d1de4341..9791826e1b1afebecac67344ac907d4bc6437841 100644 (file)
@@ -13,8 +13,8 @@ int i16_2_test[sizeof(i16_1) == 2 ? 1 : -1];
 typedef float f64 __attribute((mode(DF)));
 int f64_test[sizeof(f64) == 8 ? 1 : -1];
 
-typedef int invalid_1 __attribute((mode)); // expected-error{{attribute requires unquoted parameter}}
-typedef int invalid_2 __attribute((mode())); // expected-error{{attribute requires unquoted parameter}}
+typedef int invalid_1 __attribute((mode)); // expected-error{{'mode' attribute requires an identifier}}
+typedef int invalid_2 __attribute((mode())); // expected-error{{'mode' attribute requires an identifier}}
 typedef int invalid_3 __attribute((mode(II))); // expected-error{{unknown machine mode}}
 typedef struct {int i,j,k;} invalid_4 __attribute((mode(SI))); // expected-error{{mode attribute only supported for integer and floating-point types}}
 typedef float invalid_5 __attribute((mode(SI))); // expected-error{{type of machine mode does not match type of base type}}