diff options
author | dim <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
commit | 36c49e3f258dced101949edabd72e9bc3f1dedc4 (patch) | |
tree | 0bbe07708f7571f8b5291f6d7b96c102b7c99dee /test/SemaCXX/vector.cpp | |
parent | fc84956ac8b7cd244ef30e7a4d4d38a58dec5904 (diff) | |
download | FreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.zip FreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.tar.gz |
Vendor import of clang r114020 (from the release_28 branch):
http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020
Approved by: rpaulo (mentor)
Diffstat (limited to 'test/SemaCXX/vector.cpp')
-rw-r--r-- | test/SemaCXX/vector.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/SemaCXX/vector.cpp b/test/SemaCXX/vector.cpp index 66b2d68..9ae2c82 100644 --- a/test/SemaCXX/vector.cpp +++ b/test/SemaCXX/vector.cpp @@ -51,10 +51,10 @@ void conditional(bool Cond, char16 c16, longlong16 ll16, char16_e c16e, __typeof__(Cond? ll16 : ll16e) *ll16ep2 = &ll16e; __typeof__(Cond? ll16e : ll16) *ll16ep3 = &ll16e; - // Conditional operators with incompatible types. - (void)(Cond? c16 : ll16); // expected-error{{can't convert between vector values}} - (void)(Cond? ll16e : c16e); // expected-error{{can't convert between vector values}} - (void)(Cond? ll16e : c16); // expected-error{{can't convert between vector values}} + // Conditional operators with compatible types under -flax-vector-conversions (default) + (void)(Cond? c16 : ll16); + (void)(Cond? ll16e : c16e); + (void)(Cond? ll16e : c16); } // Test C++ cast'ing of vector types. @@ -183,8 +183,10 @@ void test_implicit_conversions(bool Cond, char16 c16, longlong16 ll16, (void)(Cond? to_c16 : to_c16e); (void)(Cond? to_ll16e : to_ll16); - (void)(Cond? to_c16 : to_ll16); // expected-error{{can't convert between vector values of different size}} - (void)(Cond? to_c16e : to_ll16e); // expected-error{{can't convert between vector values of different size}} + + // These 2 are convertable with -flax-vector-conversions (default) + (void)(Cond? to_c16 : to_ll16); + (void)(Cond? to_c16e : to_ll16e); } typedef float fltx2 __attribute__((__vector_size__(8))); |