From 2bbae5de98f486d03e10c039668182075b5569dd Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 23 Jan 2010 20:20:40 +0000 Subject: 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 --- test/SemaCXX/aggregate-initialization.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/SemaCXX/aggregate-initialization.cpp') 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 *'}} -- cgit v1.2.3-70-g09d2