diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-25 20:41:38 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-25 20:41:38 +0000 |
commit | 1adc8c339184d09a40d770524a19734a213807ba (patch) | |
tree | b6ea76ccbb85e82dc7d07797781dc9c3fe2e9f0e /clang/test/Sema/vector-init.c | |
parent | 0651d7650afe49e73d4533064aa5b6d2a85041c9 (diff) | |
download | bcm5719-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/Sema/vector-init.c')
-rw-r--r-- | clang/test/Sema/vector-init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Sema/vector-init.c b/clang/test/Sema/vector-init.c index 5be040ae6c1..9f27bb882e6 100644 --- a/clang/test/Sema/vector-init.c +++ b/clang/test/Sema/vector-init.c @@ -40,5 +40,5 @@ typedef short __attribute__((vector_size(8))) short4; void test3() { extern short8 test3_helper(void); longlong2 arr1[2] = { test3_helper(), test3_helper() }; - short4 arr2[2] = { test3_helper(), test3_helper() }; // expected-error 2 {{initializing 'short4' with an expression of incompatible type 'short8'}} + short4 arr2[2] = { test3_helper(), test3_helper() }; // expected-error 2 {{initializing 'short4' (vector of 4 'short' values) with an expression of incompatible type 'short8' (vector of 8 'short' values)}} } |