]> granicus.if.org Git - clang/commitdiff
adjust for the new -Wvector-conversions option
authorChris Lattner <sabre@nondot.org>
Fri, 17 Apr 2009 18:39:25 +0000 (18:39 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 17 Apr 2009 18:39:25 +0000 (18:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69366 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/vector-assign.c
test/Sema/vector-cast.c

index 3c0cd9020c85e31bd8764d57a0b8f214e9a0911a..5162e1a41c2117fc5eddaaf3f7148445ef2726df 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only -Wvector-conversions
 typedef unsigned int v2u __attribute__ ((vector_size (8)));
 typedef signed int v2s __attribute__ ((vector_size (8)));
 typedef signed int v1s __attribute__ ((vector_size (4)));
index 15f29b91e944c3a1a070c167fe1fa1dc3f2e2009..bd09e69800cc0f16f502e90cb8f12e7d969d271c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify -Wvector-conversions
 
 typedef long long t1 __attribute__ ((vector_size (8)));
 typedef char t2 __attribute__ ((vector_size (16)));
@@ -28,3 +28,11 @@ type 't1' and integer type 'short' of different size}}
   char *r3 = (char *)v1; // -expected-error {{invalid conversion between vector\
  type 't1' and scalar type 'char *'}}
 }
+
+
+void f2(t2 X);
+
+void f3(t3 Y) {
+  f2(Y);  // expected-warning {{incompatible vector types passing 't3', expected 't2'}}
+}
+