]> granicus.if.org Git - clang/commitdiff
Clean up the diagnostic complaining about the element type of a vector
authorDouglas Gregor <dgregor@apple.com>
Wed, 30 Jun 2010 17:30:41 +0000 (17:30 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 30 Jun 2010 17:30:41 +0000 (17:30 +0000)
type so that it actually complains about the element type itself.

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

include/clang/Basic/DiagnosticSemaKinds.td
test/Sema/ext_vector_casts.c
test/Sema/types.c
test/SemaTemplate/ext-vector-type.cpp

index fae25196fefeb9f9a086602bf867c4f246ecb2f7..9771245fd63b8080beb4b6173a64a9d576967877 100644 (file)
@@ -815,7 +815,7 @@ def err_attribute_wrong_number_arguments : Error<
   "attribute requires %0 argument(s)">;
 def err_attribute_missing_parameter_name : Error<
   "attribute requires unquoted parameter">;
-def err_attribute_invalid_vector_type : Error<"invalid vector type %0">;
+def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">;
 def err_attribute_argument_not_int : Error<
   "'%0' attribute requires integer constant">;
 def err_attribute_argument_outof_range : Error<
index 143ce04e216c536e16596852c386589bac7458f5..76819534dbb3559796c347d23ea3fb7801f6aa5d 100644 (file)
@@ -44,7 +44,7 @@ static void test() {
     ivec4 += ptr; // expected-error {{can't convert between vector values of different size ('int4' and 'int *')}}
 }
 
-typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector type 'float2'}}
+typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector element type 'float2'}}
 
 void inc(float2 f2) {
   f2++; // expected-error{{cannot increment value of type 'float2'}}
index 1770bf5bd03e3d4f60525a030bc049ef992f43fa..f3244f7799b67ef38b37ade13ca8c08129df39d4 100644 (file)
@@ -36,4 +36,4 @@ _Decimal32 x;  // expected-error {{GNU decimal type extension not supported}}
 
 
 // rdar://6880951
-int __attribute__ ((vector_size (8), vector_size (8))) v;  // expected-error {{invalid vector type}}
+int __attribute__ ((vector_size (8), vector_size (8))) v;  // expected-error {{invalid vector element type}}
index 3973102b92e7bd28b39cd6a6a5ccd54357c92b55..7334e88e9267d50d87b032ece9ad4fe171485baf 100644 (file)
@@ -20,7 +20,7 @@ int test_make2() {
 
 template<typename T, unsigned Length> 
 struct make3 { 
-  typedef T __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector type 's'}}
+  typedef T __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector element type 's'}}
 };
 
 struct s {};
@@ -42,7 +42,7 @@ int test_make4() {
 typedef int* int_ptr;
 template<unsigned Length>
 struct make5 {
-  typedef int_ptr __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector type}}             
+  typedef int_ptr __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector element type}}
 };
 
 template<int Length>