Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
Abramo Bagnara | cdb8076 | 2011-07-11 08:52:40 +0000 | [diff] [blame] | 2 | |
| 3 | struct S; // expected-note 4{{forward declaration of 'S'}} |
| 4 | |
| 5 | struct T0 { |
| 6 | S s; // expected-error{{field has incomplete type 'S'}} |
| 7 | T0() = default; |
| 8 | }; |
| 9 | |
| 10 | struct T1 { |
| 11 | S s; // expected-error{{field has incomplete type 'S'}} |
Richard Smith | 3003e1d | 2012-05-15 04:39:51 +0000 | [diff] [blame^] | 12 | T1(const T1&) = default; |
Abramo Bagnara | cdb8076 | 2011-07-11 08:52:40 +0000 | [diff] [blame] | 13 | }; |
| 14 | |
| 15 | struct T2 { |
| 16 | S s; // expected-error{{field has incomplete type 'S'}} |
Richard Smith | 3003e1d | 2012-05-15 04:39:51 +0000 | [diff] [blame^] | 17 | T2& operator=(const T2&) = default; |
Abramo Bagnara | cdb8076 | 2011-07-11 08:52:40 +0000 | [diff] [blame] | 18 | }; |
| 19 | |
| 20 | struct T3 { |
| 21 | S s; // expected-error{{field has incomplete type 'S'}} |
| 22 | ~T3() = default; |
| 23 | }; |