Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
Douglas Gregor | 68dd3ee | 2010-05-20 02:24:22 +0000 | [diff] [blame] | 2 | struct Y { |
| 3 | Y(); |
| 4 | |
| 5 | private: |
| 6 | ~Y(); // expected-note 3{{declared private here}} |
| 7 | }; |
| 8 | |
| 9 | template<typename T> |
| 10 | struct X : T { }; // expected-error 2{{private destructor}} |
| 11 | |
| 12 | struct Z; // expected-note{{forward declaration}} |
| 13 | |
| 14 | @interface A { |
| 15 | X<Y> x; // expected-note{{implicit default destructor}} |
| 16 | Y y; // expected-error{{private destructor}} |
| 17 | } |
| 18 | @end |
| 19 | |
| 20 | @implementation A // expected-note{{implicit default constructor}} |
| 21 | @end |
| 22 | |
| 23 | @interface B { |
| 24 | Z z; // expected-error{{incomplete type}} |
| 25 | } |
| 26 | @end |
| 27 | |
| 28 | @implementation B |
| 29 | @end |
Douglas Gregor | e656b83 | 2012-04-23 16:42:52 +0000 | [diff] [blame] | 30 | |
| 31 | // <rdar://problem/11284902> |
| 32 | template<typename T> struct Incomplete; // expected-note{{declared here}} |
| 33 | |
| 34 | @interface C { |
| 35 | Incomplete<int> a[4][4][4]; // expected-error{{implicit instantiation of undefined template 'Incomplete<int>'}} |
| 36 | } |
| 37 | @end |