err_attribute_missing_parameter_name has been replaced by err_attribute_argument_type.

llvm-svn: 187420
This commit is contained in:
Aaron Ballman 2013-07-30 14:29:12 +00:00
parent 9d695091fd
commit 9744ffd652
3 changed files with 4 additions and 5 deletions

View 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">;

View 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;
}

View 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}}