2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2007-10-13 06:10:42 +08:00
|
|
|
|
|
|
|
@interface Super @end
|
2009-04-12 16:25:48 +08:00
|
|
|
Super s1; // expected-error{{interface type cannot be statically allocated}}
|
2007-10-13 06:10:42 +08:00
|
|
|
|
2009-04-12 16:25:48 +08:00
|
|
|
extern Super e1; // expected-error{{interface type cannot be statically allocated}}
|
2007-10-13 06:10:42 +08:00
|
|
|
|
|
|
|
struct S {
|
2009-04-12 16:25:48 +08:00
|
|
|
Super s1; // expected-error{{interface type cannot be statically allocated}}
|
2007-10-13 06:10:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
@protocol P1 @end
|
|
|
|
|
|
|
|
@interface INTF
|
|
|
|
{
|
2009-04-12 16:25:48 +08:00
|
|
|
Super ivar1; // expected-error{{interface type cannot be statically allocated}}
|
2007-10-13 06:10:42 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2009-02-21 06:59:16 +08:00
|
|
|
struct whatever {
|
2009-04-12 16:25:48 +08:00
|
|
|
Super objField; // expected-error{{interface type cannot be statically allocated}}
|
2009-02-21 06:59:16 +08:00
|
|
|
};
|
|
|
|
|
2007-10-13 06:10:42 +08:00
|
|
|
@interface MyIntf
|
|
|
|
{
|
2009-04-12 16:25:48 +08:00
|
|
|
Super<P1> ivar1; // expected-error{{interface type cannot be statically allocated}}
|
2007-10-13 06:10:42 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2011-12-15 08:38:15 +08:00
|
|
|
Super foo( // expected-error{{interface type 'Super' cannot be returned by value; did you forget * in 'Super'}}
|
|
|
|
Super parm1) { // expected-error{{interface type 'Super' cannot be passed by value; did you forget * in 'Super'}}
|
2009-04-12 16:25:48 +08:00
|
|
|
Super p1; // expected-error{{interface type cannot be statically allocated}}
|
2007-10-13 06:10:42 +08:00
|
|
|
return p1;
|
|
|
|
}
|
2009-08-13 02:17:53 +08:00
|
|
|
|
|
|
|
@interface NSMutableSet @end
|
|
|
|
|
|
|
|
@interface DVTDummyAnnotationProvider
|
|
|
|
@property(readonly) NSMutableSet annotations; // expected-error{{interface type cannot be statically allocated}}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|