summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-altivec.cpp
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/Parser/cxx-altivec.cpp
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/Parser/cxx-altivec.cpp')
-rw-r--r--clang/test/Parser/cxx-altivec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx-altivec.cpp b/clang/test/Parser/cxx-altivec.cpp
index be00e494fd5..27cab2c9c41 100644
--- a/clang/test/Parser/cxx-altivec.cpp
+++ b/clang/test/Parser/cxx-altivec.cpp
@@ -93,8 +93,8 @@ void f() {
gccvector unsigned int gv = v;
gccvector int gvi = (gccvector int)v;
__attribute__((vector_size(8))) unsigned int gv8;
- gv8 = gccv; // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int'}}
- av = gv8; // expected-error {{assigning to '__vector unsigned int' from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}}
+ gv8 = gccv; // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' (vector of 2 'unsigned int' values) from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int' (vector of 4 'unsigned int' values)}}
+ av = gv8; // expected-error {{assigning to '__vector unsigned int' (vector of 4 'unsigned int' values) from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' (vector of 2 'unsigned int' values)}}
v = gccv;
__vector unsigned int tv = gccv;
OpenPOWER on IntegriCloud