[cfe-commits] r69366 - in /cfe/trunk/test/Sema: vector-assign.c vector-cast.c

Chris Lattner sabre at nondot.org
Fri Apr 17 11:39:25 PDT 2009


Author: lattner
Date: Fri Apr 17 13:39:25 2009
New Revision: 69366

URL: http://llvm.org/viewvc/llvm-project?rev=69366&view=rev
Log:
adjust for the new -Wvector-conversions option

Modified:
    cfe/trunk/test/Sema/vector-assign.c
    cfe/trunk/test/Sema/vector-cast.c

Modified: cfe/trunk/test/Sema/vector-assign.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/vector-assign.c?rev=69366&r1=69365&r2=69366&view=diff

==============================================================================
--- cfe/trunk/test/Sema/vector-assign.c (original)
+++ cfe/trunk/test/Sema/vector-assign.c Fri Apr 17 13:39:25 2009
@@ -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)));

Modified: cfe/trunk/test/Sema/vector-cast.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/vector-cast.c?rev=69366&r1=69365&r2=69366&view=diff

==============================================================================
--- cfe/trunk/test/Sema/vector-cast.c (original)
+++ cfe/trunk/test/Sema/vector-cast.c Fri Apr 17 13:39:25 2009
@@ -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 @@
   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'}}
+}
+





More information about the cfe-commits mailing list