[cfe-commits] r101863 - in /cfe/trunk: lib/Sema/SemaInit.cpp test/Parser/altivec.c test/Parser/cxx-altivec.cpp
John Thompson
John.Thompson.JTSoftware at gmail.com
Mon Apr 19 20:58:33 PDT 2010
Author: jtsoftware
Date: Mon Apr 19 22:58:33 2010
New Revision: 101863
URL: http://llvm.org/viewvc/llvm-project?rev=101863&view=rev
Log:
Altivec vector literal initializer count mismatch error removed.
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=101863&r1=101862&r2=101863&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Apr 19 22:58:33 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=101863&r1=101862&r2=101863&view=diff
==============================================================================
--- cfe/trunk/test/Parser/altivec.c (original)
+++ cfe/trunk/test/Parser/altivec.c Mon Apr 19 22:58:33 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=101863&r1=101862&r2=101863&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx-altivec.cpp (original)
+++ cfe/trunk/test/Parser/cxx-altivec.cpp Mon Apr 19 22:58:33 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