1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambucstruct Y { 3*f4a2713aSLionel Sambuc Y(); 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambucprivate: 6*f4a2713aSLionel Sambuc ~Y(); // expected-note 3{{declared private here}} 7*f4a2713aSLionel Sambuc}; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuctemplate<typename T> 10*f4a2713aSLionel Sambucstruct X : T { }; // expected-error 2{{private destructor}} 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambucstruct Z; // expected-note{{forward declaration}} 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@interface A { 15*f4a2713aSLionel Sambuc X<Y> x; // expected-note{{implicit destructor}} 16*f4a2713aSLionel Sambuc Y y; // expected-error{{private destructor}} 17*f4a2713aSLionel Sambuc} 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@implementation A // expected-note{{implicit default constructor}} 21*f4a2713aSLionel Sambuc@end 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@interface B { 24*f4a2713aSLionel Sambuc Z z; // expected-error{{incomplete type}} 25*f4a2713aSLionel Sambuc} 26*f4a2713aSLionel Sambuc@end 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc@implementation B 29*f4a2713aSLionel Sambuc@end 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc// <rdar://problem/11284902> 32*f4a2713aSLionel Sambuctemplate<typename T> struct Incomplete; // expected-note{{declared here}} 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambuc@interface C { 35*f4a2713aSLionel Sambuc Incomplete<int> a[4][4][4]; // expected-error{{implicit instantiation of undefined template 'Incomplete<int>'}} 36*f4a2713aSLionel Sambuc} 37*f4a2713aSLionel Sambuc@end 38