summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaOpenCL/vector_conv_invalid.cl
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-04-25 20:41:38 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-04-25 20:41:38 +0000
commit1adc8c339184d09a40d770524a19734a213807ba (patch)
treeb6ea76ccbb85e82dc7d07797781dc9c3fe2e9f0e /clang/test/SemaOpenCL/vector_conv_invalid.cl
parent0651d7650afe49e73d4533064aa5b6d2a85041c9 (diff)
downloadbcm5719-llvm-1adc8c339184d09a40d770524a19734a213807ba.tar.gz
bcm5719-llvm-1adc8c339184d09a40d770524a19734a213807ba.zip
Print detailed vector type information on diagnostics.
We never aka vector types because our attributed syntax for it is less comprehensible than the typedefs. This leaves the user in the dark when the typedef isn't named that well. Example: v2s v; v4f w; w = v; The naming in this cases isn't even that bad, but the error we give is useless without looking up the actual typedefs. t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s' Now: t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from incompatible type 'v2s' (vector of 2 'int' values) We do this for all diagnostics that print a vector type. llvm-svn: 207267
Diffstat (limited to 'clang/test/SemaOpenCL/vector_conv_invalid.cl')
-rw-r--r--clang/test/SemaOpenCL/vector_conv_invalid.cl6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaOpenCL/vector_conv_invalid.cl b/clang/test/SemaOpenCL/vector_conv_invalid.cl
index e6ef5a492f8..90cec26a605 100644
--- a/clang/test/SemaOpenCL/vector_conv_invalid.cl
+++ b/clang/test/SemaOpenCL/vector_conv_invalid.cl
@@ -7,8 +7,8 @@ typedef unsigned uint3 __attribute((ext_vector_type(3)));
void vector_conv_invalid() {
uint4 u = (uint4)(1);
- int4 i = u; // expected-error{{initializing 'int4' with an expression of incompatible type 'uint4'}}
- int4 e = (int4)u; // expected-error{{invalid conversion between ext-vector type 'int4' and 'uint4'}}
+ int4 i = u; // expected-error{{initializing 'int4' (vector of 4 'int' values) with an expression of incompatible type 'uint4' (vector of 4 'unsigned int' values)}}
+ int4 e = (int4)u; // expected-error{{invalid conversion between ext-vector type 'int4' (vector of 4 'int' values) and 'uint4' (vector of 4 'unsigned int' values)}}
- uint3 u4 = (uint3)u; // expected-error{{invalid conversion between ext-vector type 'uint3' and 'uint4'}}
+ uint3 u4 = (uint3)u; // expected-error{{invalid conversion between ext-vector type 'uint3' (vector of 3 'unsigned int' values) and 'uint4' (vector of 4 'unsigned int' values)}}
}
OpenPOWER on IntegriCloud