Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s |
Fariborz Jahanian | 24fce28 | 2010-11-09 02:16:57 +0000 | [diff] [blame] | 2 | // rdar://8225011 |
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 3 | |
Fariborz Jahanian | f759b4d | 2010-08-13 18:09:39 +0000 | [diff] [blame] | 4 | int glob; // expected-note {{global variable declared here}} |
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 5 | |
| 6 | @interface I |
| 7 | @property int glob; // expected-note {{property declared here}} |
Fariborz Jahanian | b1d58e3 | 2010-07-29 16:53:53 +0000 | [diff] [blame] | 8 | @property int p; |
| 9 | @property int le; |
| 10 | @property int l; |
| 11 | @property int ls; |
| 12 | @property int r; |
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 13 | @end |
| 14 | |
| 15 | @implementation I |
Fariborz Jahanian | f759b4d | 2010-08-13 18:09:39 +0000 | [diff] [blame] | 16 | - (int) Meth { return glob; } // expected-warning {{when default property synthesis is on, 'glob' lookup will access}} |
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 17 | @synthesize glob; |
Fariborz Jahanian | 24fce28 | 2010-11-09 02:16:57 +0000 | [diff] [blame] | 18 | // rdar://8248681 |
Fariborz Jahanian | b1d58e3 | 2010-07-29 16:53:53 +0000 | [diff] [blame] | 19 | - (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 Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 32 | @end |
Fariborz Jahanian | b1d58e3 | 2010-07-29 16:53:53 +0000 | [diff] [blame] | 33 | |
| 34 | |