[cfe-commits] r107299 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/Sema/ext_vector_casts.c test/Sema/types.c test/SemaTemplate/ext-vector-type.cpp
Douglas Gregor
dgregor at apple.com
Wed Jun 30 10:30:41 PDT 2010
Author: dgregor
Date: Wed Jun 30 12:30:41 2010
New Revision: 107299
URL: http://llvm.org/viewvc/llvm-project?rev=107299&view=rev
Log:
Clean up the diagnostic complaining about the element type of a vector
type so that it actually complains about the element type itself.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Sema/ext_vector_casts.c
cfe/trunk/test/Sema/types.c
cfe/trunk/test/SemaTemplate/ext-vector-type.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=107299&r1=107298&r2=107299&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Jun 30 12:30:41 2010
@@ -815,7 +815,7 @@
"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<
Modified: cfe/trunk/test/Sema/ext_vector_casts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ext_vector_casts.c?rev=107299&r1=107298&r2=107299&view=diff
==============================================================================
--- cfe/trunk/test/Sema/ext_vector_casts.c (original)
+++ cfe/trunk/test/Sema/ext_vector_casts.c Wed Jun 30 12:30:41 2010
@@ -44,7 +44,7 @@
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'}}
Modified: cfe/trunk/test/Sema/types.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/types.c?rev=107299&r1=107298&r2=107299&view=diff
==============================================================================
--- cfe/trunk/test/Sema/types.c (original)
+++ cfe/trunk/test/Sema/types.c Wed Jun 30 12:30:41 2010
@@ -36,4 +36,4 @@
// 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}}
Modified: cfe/trunk/test/SemaTemplate/ext-vector-type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/ext-vector-type.cpp?rev=107299&r1=107298&r2=107299&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/ext-vector-type.cpp (original)
+++ cfe/trunk/test/SemaTemplate/ext-vector-type.cpp Wed Jun 30 12:30:41 2010
@@ -20,7 +20,7 @@
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 @@
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>
More information about the cfe-commits
mailing list