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 | 2bbae5de98f486d03e10c039668182075b5569dd (patch) | |
tree | 35267e97f56afe56e149131b35a650b5e21d35e9 /test/SemaCXX/aggregate-initialization.cpp | |
parent | 784f69940755dd66cf244dd84f57a57d358e5c43 (diff) |
Use the new init code for member subobjects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/aggregate-initialization.cpp')
-rw-r--r-- | test/SemaCXX/aggregate-initialization.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/aggregate-initialization.cpp b/test/SemaCXX/aggregate-initialization.cpp index 35db65173f..3c9333b795 100644 --- a/test/SemaCXX/aggregate-initialization.cpp +++ b/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 *'}} |