summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/aggregate-initialization.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-01-23 19:55:29 +0000
committerAnders Carlsson <andersca@mac.com>2010-01-23 19:55:29 +0000
commitd0849254deaf68fa4353b711eebfa207335ddbb2 (patch)
tree62a53074b622d87a7baa55a1d5d9b15fa1e8fb28 /clang/test/SemaCXX/aggregate-initialization.cpp
parent3cc795ae8d71834ed3986d82de2816c255a66eb0 (diff)
downloadbcm5719-llvm-d0849254deaf68fa4353b711eebfa207335ddbb2.tar.gz
bcm5719-llvm-d0849254deaf68fa4353b711eebfa207335ddbb2.zip
Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++.
llvm-svn: 94325
Diffstat (limited to 'clang/test/SemaCXX/aggregate-initialization.cpp')
-rw-r--r--clang/test/SemaCXX/aggregate-initialization.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/aggregate-initialization.cpp b/clang/test/SemaCXX/aggregate-initialization.cpp
index ac482151fac..2e6c1a329a8 100644
--- a/clang/test/SemaCXX/aggregate-initialization.cpp
+++ b/clang/test/SemaCXX/aggregate-initialization.cpp
@@ -30,3 +30,7 @@ NonAggr4 na4 = { 17 }; // expected-error{{non-aggregate type 'struct NonAggr4' c
// PR5817
typedef int type[][2];
const type foo = {0};
+
+// Vector initialization.
+typedef short __v4hi __attribute__ ((__vector_size__ (8)));
+__v4hi v1 = { (void *)1, 2, 3 }; // expected-error {{cannot initialize a vector element of type 'short' with an rvalue of type 'void *'}}
OpenPOWER on IntegriCloud