blob: 8a61041463bae2f4e0483aebe2eba17c29a273f0 [file] [log] [blame]
Argyrios Kyrtzidisdd7744d2010-08-16 17:27:08 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3struct S {
Richard Smithac713512012-12-08 02:53:02 +00004 S(); // expected-note {{because type 'S' has a user-provided default constructor}}
Argyrios Kyrtzidisdd7744d2010-08-16 17:27:08 +00005};
6
David Blaikie2b79c322011-10-19 22:43:29 +00007struct { // expected-error {{anonymous structs and classes must be class members}}
8};
9
Argyrios Kyrtzidisdd7744d2010-08-16 17:27:08 +000010struct E {
11 struct {
Richard Smithac713512012-12-08 02:53:02 +000012 S x; // expected-error {{anonymous struct member 'x' has a non-trivial constructor}}
Argyrios Kyrtzidisdd7744d2010-08-16 17:27:08 +000013 };
David Blaikie2b79c322011-10-19 22:43:29 +000014 static struct {
15 };
Argyrios Kyrtzidisdd7744d2010-08-16 17:27:08 +000016};