summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/vector-cast.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/vector-cast.c')
-rw-r--r--clang/test/Sema/vector-cast.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Sema/vector-cast.c b/clang/test/Sema/vector-cast.c
index 03db5408c45..a05625078be 100644
--- a/clang/test/Sema/vector-cast.c
+++ b/clang/test/Sema/vector-cast.c
@@ -50,7 +50,12 @@ void f4() {
float2 f2;
double d;
f2 += d;
- d += f2;
+ // We used to allow the next statement, but we've always rejected the next two
+ // statements
+ // FIXME: This diagnostic is inaccurate.
+ d += f2; // expected-error {{cannot convert between vector values of different size}}
+ d = f2; // expected-error {{assigning to 'double' from incompatible type 'float2'}}
+ d = d + f2; // expected-error {{assigning to 'double' from incompatible type 'float2'}}
}
// rdar://15931426
OpenPOWER on IntegriCloud