diff options
author | Anders Carlsson <andersca@mac.com> | 2010-01-23 20:20:40 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-01-23 20:20:40 +0000 |
commit | 73eb7cd3514cf3124e751f03dd80990bb7d070c1 (patch) | |
tree | 0ad11ab141c9f25bb16ea497f2bbf260eb77f21a /clang/test/SemaCXX/aggregate-initialization.cpp | |
parent | 0cf999b663f8cde815196fc7b65ee33ca41077c4 (diff) | |
download | bcm5719-llvm-73eb7cd3514cf3124e751f03dd80990bb7d070c1.tar.gz bcm5719-llvm-73eb7cd3514cf3124e751f03dd80990bb7d070c1.zip |
Use the new init code for member subobjects.
llvm-svn: 94329
Diffstat (limited to 'clang/test/SemaCXX/aggregate-initialization.cpp')
-rw-r--r-- | clang/test/SemaCXX/aggregate-initialization.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/aggregate-initialization.cpp b/clang/test/SemaCXX/aggregate-initialization.cpp index 35db65173f5..3c9333b7953 100644 --- a/clang/test/SemaCXX/aggregate-initialization.cpp +++ b/clang/test/SemaCXX/aggregate-initialization.cpp @@ -37,3 +37,6 @@ __v4hi v1 = { (void *)1, 2, 3 }; // expected-error {{cannot initialize a vector // Array initialization. int a[] = { (void *)1 }; // expected-error {{cannot initialize an array element of type 'int' with an rvalue of type 'void *'}} + +// Struct initialization. +struct S { int a; } s = { (void *)1 }; // expected-error {{cannot initialize a member subobject of type 'int' with an rvalue of type 'void *'}} |