]> granicus.if.org Git - clang/commit
Print detailed vector type information on diagnostics.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 25 Apr 2014 20:41:38 +0000 (20:41 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 25 Apr 2014 20:41:38 +0000 (20:41 +0000)
commitf0b65979d2eea490104c8f6a6230cceeda2aab70
tree074be3522a280e67245a6fd3fc147db85801cfcc
parentfbba3c174ca9006db4ea9837ccb0294be1ea39d1
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
15 files changed:
lib/AST/ASTDiagnostic.cpp
test/CodeGen/mmx-inline-asm-error.c
test/Parser/altivec.c
test/Parser/cxx-altivec.cpp
test/Parser/opencl-astype.cl
test/Sema/ext_vector_casts.c
test/Sema/transparent-union.c
test/Sema/typedef-retain.c
test/Sema/vector-assign.c
test/Sema/vector-cast.c
test/Sema/vector-init.c
test/Sema/vector-ops.c
test/SemaCXX/vector-casts.cpp
test/SemaCXX/vector.cpp
test/SemaOpenCL/vector_conv_invalid.cl