summaryrefslogtreecommitdiffstats
path: root/test/SemaOpenCL
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
commitf0b65979d2eea490104c8f6a6230cceeda2aab70 (patch)
tree074be3522a280e67245a6fd3fc147db85801cfcc /test/SemaOpenCL
parentfbba3c174ca9006db4ea9837ccb0294be1ea39d1 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r--test/SemaOpenCL/vector_conv_invalid.cl6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaOpenCL/vector_conv_invalid.cl b/test/SemaOpenCL/vector_conv_invalid.cl
index e6ef5a492f..90cec26a60 100644
--- a/test/SemaOpenCL/vector_conv_invalid.cl
+++ b/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)}}
}