blob: a342acb156fd4ffee14cece479793fe49efb8e53 [file] [log] [blame]
Fariborz Jahanian80b0b422008-11-20 18:10:58 +00001// RUN: clang -fsyntax-only -fobjc-gc -verify %s
2
3struct S {
4 __weak id w; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
5 __strong id p1;
6};
7
Fariborz Jahanian24b93f22008-11-20 19:35:51 +00008@interface I
9{
10 __weak id w; // OK
11 __strong id LHS;
12}
13- (void) foo;
14@end
15@implementation I
16- (void) foo { w = 0; LHS = w; }
17@end
18
Fariborz Jahanian80b0b422008-11-20 18:10:58 +000019int main ()
20{
21 struct I {
22 __weak id w1; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
23 };
24}