summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2010-04-20 03:58:33 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2010-04-20 03:58:33 +0000
commitf351b2c2b49433c6497bc07370e5cebc8d3b9682 (patch)
tree224454942cf62d28bbbfc57dc8b9e37c23375c14
parent40eb21a82753e803de458096c66f308515d5bc44 (diff)
downloadbcm5719-llvm-f351b2c2b49433c6497bc07370e5cebc8d3b9682.tar.gz
bcm5719-llvm-f351b2c2b49433c6497bc07370e5cebc8d3b9682.zip
Altivec vector literal initializer count mismatch error removed.
llvm-svn: 101863
-rw-r--r--clang/lib/Sema/SemaInit.cpp2
-rw-r--r--clang/test/Parser/altivec.c2
-rw-r--r--clang/test/Parser/cxx-altivec.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 7929b588b63..981d5831b0c 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -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;
diff --git a/clang/test/Parser/altivec.c b/clang/test/Parser/altivec.c
index a3e8183f359..ed144573fcd 100644
--- a/clang/test/Parser/altivec.c
+++ b/clang/test/Parser/altivec.c
@@ -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}}
diff --git a/clang/test/Parser/cxx-altivec.cpp b/clang/test/Parser/cxx-altivec.cpp
index 7f7a9d2df68..66d4f3263b9 100644
--- a/clang/test/Parser/cxx-altivec.cpp
+++ b/clang/test/Parser/cxx-altivec.cpp
@@ -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}}
OpenPOWER on IntegriCloud