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