Sean Hunt | cf34e75 | 2011-05-16 22:41:40 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s |
2 | |||||
3 | struct non_trivial { | ||||
4 | non_trivial(); | ||||
5 | non_trivial(const non_trivial&); | ||||
6 | non_trivial& operator = (const non_trivial&); | ||||
7 | ~non_trivial(); | ||||
8 | }; | ||||
9 | |||||
10 | union u { | ||||
11 | non_trivial nt; | ||||
12 | }; | ||||
13 | |||||
14 | union bad { | ||||
15 | static int i; // expected-error {{static data member}} | ||||
16 | }; | ||||
17 | |||||
18 | struct s { | ||||
19 | union { | ||||
20 | non_trivial nt; | ||||
21 | }; | ||||
22 | }; |