Altivec vector literal initializer count mismatch error removed.

llvm-svn: 101863
This commit is contained in:
John Thompson 2010-04-20 03:58:33 +00:00
parent 40eb21a827
commit f351b2c2b4
3 changed files with 5 additions and 1 deletions

View File

@ -886,7 +886,7 @@ void InitListChecker::CheckVectorType(const InitializedEntity &Entity,
// 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;

View File

@ -40,6 +40,8 @@ vector int f__r();
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}}

View File

@ -41,6 +41,8 @@ vector int f__r();
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}}