diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-17 20:33:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-17 20:33:28 +0000 |
commit | ec3a1565f69d8ae3fd2772e9b0f83237d98e5ebf (patch) | |
tree | 5eb2dbc3c9e19f1499ea8e0fd4969c7034841afd /clang/test/Sema/vector-assign.c | |
parent | 867f67301b7c35135d04e437eb186f5a4e6b9826 (diff) | |
download | bcm5719-llvm-ec3a1565f69d8ae3fd2772e9b0f83237d98e5ebf.tar.gz bcm5719-llvm-ec3a1565f69d8ae3fd2772e9b0f83237d98e5ebf.zip |
teach getCorrespondingUnsignedType how to handle vectors of integers,
fixing PR4838.
llvm-svn: 84353
Diffstat (limited to 'clang/test/Sema/vector-assign.c')
-rw-r--r-- | clang/test/Sema/vector-assign.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/test/Sema/vector-assign.c b/clang/test/Sema/vector-assign.c index 5162e1a41c2..bf9c7f37ca6 100644 --- a/clang/test/Sema/vector-assign.c +++ b/clang/test/Sema/vector-assign.c @@ -5,7 +5,7 @@ typedef signed int v1s __attribute__ ((vector_size (4))); typedef float v2f __attribute__ ((vector_size(8))); typedef signed short v4ss __attribute__ ((vector_size (8))); -void f() { +void test1() { v2s v1; v2u v2; v1s v3; @@ -39,7 +39,15 @@ void f() { } // PR2263 -float f2(__attribute__((vector_size(16))) float a, int b) { +float test2(__attribute__((vector_size(16))) float a, int b) { return a[b]; } +// PR4838 +typedef long long __attribute__((__vector_size__(2 * sizeof(long long)))) +longlongvec; + +void test3a(longlongvec *); +void test3(const unsigned *src) { + test3a(src); // expected-warning {{incompatible pointer types passing 'unsigned int const *', expected 'longlongvec *'}} +} |