43 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@interface Super @end4Super s1; // expected-error{{interface type cannot be statically allocated}}5 6extern Super e1; // expected-error{{interface type cannot be statically allocated}}7 8struct S {9 Super s1; // expected-error{{interface type cannot be statically allocated}}10};11 12@protocol P1 @end13 14@interface INTF15{16 Super ivar1; // expected-error{{interface type cannot be statically allocated}}17}18@end19 20struct whatever {21 Super objField; // expected-error{{interface type cannot be statically allocated}}22};23 24@interface MyIntf25{26 Super<P1> ivar1; // expected-error{{interface type cannot be statically allocated}}27}28@end29 30Super foo( // expected-error{{interface type 'Super' cannot be returned by value; did you forget * in 'Super'}}31 Super parm1) { // expected-error{{interface type 'Super' cannot be passed by value; did you forget * in 'Super'}}32 Super p1; // expected-error{{interface type cannot be statically allocated}}33 return p1;34}35 36@interface NSMutableSet @end37 38@interface DVTDummyAnnotationProvider 39 @property(readonly) NSMutableSet annotations; // expected-error{{interface type cannot be statically allocated}}40 41@end42 43