Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Fariborz Jahanian | 24fce28 | 2010-11-09 02:16:57 +0000 | [diff] [blame] | 3 | // rdar://8225011 |
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 4 | |
Fariborz Jahanian | b0c2301 | 2011-02-21 17:31:28 +0000 | [diff] [blame] | 5 | int glob; |
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 6 | |
7 | @interface I | ||||
Fariborz Jahanian | b0c2301 | 2011-02-21 17:31:28 +0000 | [diff] [blame] | 8 | @property int glob; |
Fariborz Jahanian | b1d58e3 | 2010-07-29 16:53:53 +0000 | [diff] [blame] | 9 | @property int p; |
10 | @property int le; | ||||
11 | @property int l; | ||||
12 | @property int ls; | ||||
13 | @property int r; | ||||
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 14 | @end |
15 | |||||
Fariborz Jahanian | b0c2301 | 2011-02-21 17:31:28 +0000 | [diff] [blame] | 16 | // rdar://9027673 |
17 | // Warning on future name lookup rule is removed. | ||||
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 18 | @implementation I |
Fariborz Jahanian | 527eec8 | 2011-07-22 01:06:53 +0000 | [diff] [blame] | 19 | - (int) Meth { return glob; } // no warning |
Fariborz Jahanian | 7898005 | 2011-08-01 22:39:49 +0000 | [diff] [blame] | 20 | @synthesize glob; |
Fariborz Jahanian | 24fce28 | 2010-11-09 02:16:57 +0000 | [diff] [blame] | 21 | // rdar://8248681 |
Fariborz Jahanian | b1d58e3 | 2010-07-29 16:53:53 +0000 | [diff] [blame] | 22 | - (int) Meth1: (int) p { |
23 | extern int le; | ||||
24 | int l = 1; | ||||
25 | static int ls; | ||||
26 | register int r; | ||||
27 | p = le + ls + r; | ||||
28 | return l; | ||||
29 | } | ||||
Fariborz Jahanian | 7898005 | 2011-08-01 22:39:49 +0000 | [diff] [blame] | 30 | @dynamic p; |
31 | @dynamic le; | ||||
32 | @dynamic l; | ||||
33 | @dynamic ls; | ||||
34 | @dynamic r; | ||||
Fariborz Jahanian | 69d5624 | 2010-07-22 23:33:21 +0000 | [diff] [blame] | 35 | @end |
Fariborz Jahanian | b1d58e3 | 2010-07-29 16:53:53 +0000 | [diff] [blame] | 36 | |
37 |