diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-06-30 17:30:41 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-06-30 17:30:41 +0000 |
| commit | bc0c79b4ab7baea55b6e4d71175a4117b8e2af7b (patch) | |
| tree | 8f15d5776e013576cd5677637b108cbd063ef874 | |
| parent | c0cca7fdda493edb1477662cd5517fa2744f93c5 (diff) | |
| download | bcm5719-llvm-bc0c79b4ab7baea55b6e4d71175a4117b8e2af7b.tar.gz bcm5719-llvm-bc0c79b4ab7baea55b6e4d71175a4117b8e2af7b.zip | |
Clean up the diagnostic complaining about the element type of a vector
type so that it actually complains about the element type itself.
llvm-svn: 107299
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
| -rw-r--r-- | clang/test/Sema/ext_vector_casts.c | 2 | ||||
| -rw-r--r-- | clang/test/Sema/types.c | 2 | ||||
| -rw-r--r-- | clang/test/SemaTemplate/ext-vector-type.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index fae25196fef..9771245fd63 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -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< diff --git a/clang/test/Sema/ext_vector_casts.c b/clang/test/Sema/ext_vector_casts.c index 143ce04e216..76819534dbb 100644 --- a/clang/test/Sema/ext_vector_casts.c +++ b/clang/test/Sema/ext_vector_casts.c @@ -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'}} diff --git a/clang/test/Sema/types.c b/clang/test/Sema/types.c index 1770bf5bd03..f3244f7799b 100644 --- a/clang/test/Sema/types.c +++ b/clang/test/Sema/types.c @@ -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}} diff --git a/clang/test/SemaTemplate/ext-vector-type.cpp b/clang/test/SemaTemplate/ext-vector-type.cpp index 3973102b92e..7334e88e926 100644 --- a/clang/test/SemaTemplate/ext-vector-type.cpp +++ b/clang/test/SemaTemplate/ext-vector-type.cpp @@ -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> |

