blob: 19a8b04e84fa47ed76beab50ec500993a91a9a4a [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
Abramo Bagnaracdb80762011-07-11 08:52:40 +00002
3struct S; // expected-note 4{{forward declaration of 'S'}}
4
5struct T0 {
6 S s; // expected-error{{field has incomplete type 'S'}}
7 T0() = default;
8};
9
10struct T1 {
11 S s; // expected-error{{field has incomplete type 'S'}}
Richard Smith3003e1d2012-05-15 04:39:51 +000012 T1(const T1&) = default;
Abramo Bagnaracdb80762011-07-11 08:52:40 +000013};
14
15struct T2 {
16 S s; // expected-error{{field has incomplete type 'S'}}
Richard Smith3003e1d2012-05-15 04:39:51 +000017 T2& operator=(const T2&) = default;
Abramo Bagnaracdb80762011-07-11 08:52:40 +000018};
19
20struct T3 {
21 S s; // expected-error{{field has incomplete type 'S'}}
22 ~T3() = default;
23};