blob: 9db5f79fb651ec76cd2d9a50cf75f497b72b60e6 [file] [log] [blame]
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +00001// RUN: clang -fsyntax-only -verify %s
2
3@interface Super @end
Steve Naroffccef3712009-02-20 22:59:16 +00004Super s1; // expected-error{{Objective-C type cannot be statically allocated}}
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +00005
Steve Naroffccef3712009-02-20 22:59:16 +00006extern Super e1; // expected-error{{Objective-C type cannot be statically allocated}}
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +00007
8struct S {
Steve Naroffccef3712009-02-20 22:59:16 +00009 Super s1; // expected-error{{Objective-C type cannot be statically allocated}}
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +000010};
11
12@protocol P1 @end
13
14@interface INTF
15{
Steve Naroffccef3712009-02-20 22:59:16 +000016 Super ivar1; // expected-error{{Objective-C type cannot be statically allocated}}
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +000017}
18@end
19
Steve Naroffccef3712009-02-20 22:59:16 +000020struct whatever {
21 Super objField; // expected-error{{Objective-C type cannot be statically allocated}}
22};
23
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +000024@interface MyIntf
25{
Steve Naroffccef3712009-02-20 22:59:16 +000026 Super<P1> ivar1; // expected-error{{Objective-C type cannot be statically allocated}}
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +000027}
28@end
29
Steve Naroffccef3712009-02-20 22:59:16 +000030Super foo(Super parm1) { // expected-error{{Objective-C type cannot be passed by value}}
31 Super p1; // expected-error{{Objective-C type cannot be statically allocated}}
Fariborz Jahaniane7f64cc2007-10-12 22:10:42 +000032 return p1;
33}