Argyrios Kyrtzidis | dd7744d | 2010-08-16 17:27:08 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | struct S { |
| 4 | S(); // expected-note {{because type 'S' has a user-declared constructor}} |
| 5 | }; |
| 6 | |
David Blaikie | 2b79c32 | 2011-10-19 22:43:29 +0000 | [diff] [blame] | 7 | struct { // expected-error {{anonymous structs and classes must be class members}} |
| 8 | }; |
| 9 | |
Argyrios Kyrtzidis | dd7744d | 2010-08-16 17:27:08 +0000 | [diff] [blame] | 10 | struct E { |
| 11 | struct { |
| 12 | S x; // expected-error {{anonymous struct member 'x' has a non-trivial constructor}} |
| 13 | }; |
David Blaikie | 2b79c32 | 2011-10-19 22:43:29 +0000 | [diff] [blame] | 14 | static struct { |
| 15 | }; |
Argyrios Kyrtzidis | dd7744d | 2010-08-16 17:27:08 +0000 | [diff] [blame] | 16 | }; |