[cfe-commits] r101871 - in /cfe/trunk: lib/Sema/SemaInit.cpp test/Parser/altivec.c test/Parser/cxx-altivec.cpp

Chris Lattner sabre at nondot.org
Mon Apr 19 22:19:10 PDT 2010


Author: lattner
Date: Tue Apr 20 00:19:10 2010
New Revision: 101871

URL: http://llvm.org/viewvc/llvm-project?rev=101871&view=rev
Log:
reapply john's patch, he broke mainline again by changing the test.

Modified:
    cfe/trunk/lib/Sema/SemaInit.cpp
    cfe/trunk/test/Parser/altivec.c
    cfe/trunk/test/Parser/cxx-altivec.cpp

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=101871&r1=101870&r2=101871&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Tue Apr 20 00:19:10 2010
@@ -886,7 +886,7 @@
 
     // OpenCL & AltiVec require all elements to be initialized.
     if (numEltsInit != maxElements)
-      if (SemaRef.getLangOptions().OpenCL || SemaRef.getLangOptions().AltiVec)
+      if (SemaRef.getLangOptions().OpenCL)
         SemaRef.Diag(IList->getSourceRange().getBegin(),
                      diag::err_vector_incorrect_num_initializers)
           << (numEltsInit < maxElements) << maxElements << numEltsInit;

Modified: cfe/trunk/test/Parser/altivec.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/altivec.c?rev=101871&r1=101870&r2=101871&view=diff
==============================================================================
--- cfe/trunk/test/Parser/altivec.c (original)
+++ cfe/trunk/test/Parser/altivec.c Tue Apr 20 00:19:10 2010
@@ -40,6 +40,8 @@
 void f_a(vector int a);
 void f_a2(int b, vector int a);
 
+vector int v = (vector int)(-1);
+
 // These should have warnings.
 __vector long vv_l;                 // expected-warning {{Use of 'long' with '__vector' is deprecated}}
 __vector signed long vv_sl;         // expected-warning {{Use of 'long' with '__vector' is deprecated}}

Modified: cfe/trunk/test/Parser/cxx-altivec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx-altivec.cpp?rev=101871&r1=101870&r2=101871&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx-altivec.cpp (original)
+++ cfe/trunk/test/Parser/cxx-altivec.cpp Tue Apr 20 00:19:10 2010
@@ -41,6 +41,8 @@
 void f_a(vector int a);
 void f_a2(int b, vector int a);
 
+vector int v = (vector int)(-1);
+
 // These should have warnings.
 __vector long vv_l;                 // expected-warning {{Use of 'long' with '__vector' is deprecated}}
 __vector signed long vv_sl;         // expected-warning {{Use of 'long' with '__vector' is deprecated}}





More information about the cfe-commits mailing list