blob: 86947cf7643ca823f554a819cbc17de6df90d363 [file] [log] [blame]
Fariborz Jahanian69d56242010-07-22 23:33:21 +00001// RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s
Fariborz Jahanian24fce282010-11-09 02:16:57 +00002// rdar://8225011
Fariborz Jahanian69d56242010-07-22 23:33:21 +00003
Fariborz Jahanianf759b4d2010-08-13 18:09:39 +00004int glob; // expected-note {{global variable declared here}}
Fariborz Jahanian69d56242010-07-22 23:33:21 +00005
6@interface I
7@property int glob; // expected-note {{property declared here}}
Fariborz Jahanianb1d58e32010-07-29 16:53:53 +00008@property int p;
9@property int le;
10@property int l;
11@property int ls;
12@property int r;
Fariborz Jahanian69d56242010-07-22 23:33:21 +000013@end
14
15@implementation I
Fariborz Jahanianf759b4d2010-08-13 18:09:39 +000016- (int) Meth { return glob; } // expected-warning {{when default property synthesis is on, 'glob' lookup will access}}
Fariborz Jahanian69d56242010-07-22 23:33:21 +000017@synthesize glob;
Fariborz Jahanian24fce282010-11-09 02:16:57 +000018// rdar://8248681
Fariborz Jahanianb1d58e32010-07-29 16:53:53 +000019- (int) Meth1: (int) p {
20 extern int le;
21 int l = 1;
22 static int ls;
23 register int r;
24 p = le + ls + r;
25 return l;
26}
27@dynamic p;
28@dynamic le;
29@dynamic l;
30@dynamic ls;
31@dynamic r;
Fariborz Jahanian69d56242010-07-22 23:33:21 +000032@end
Fariborz Jahanianb1d58e32010-07-29 16:53:53 +000033
34