2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -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
|
|
|
|
|
2009-04-12 16:25:48 +08: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 06:10:42 +08:00
|
|
|
return p1;
|
|
|
|
}
|