Steve Naroff | d824c9c | 2009-04-14 15:11:46 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -verify %s |
2 | |||||
3 | typedef struct objc_class *Class; | ||||
4 | @interface XX | ||||
5 | |||||
6 | - (void)addObserver:(XX*)o; | ||||
7 | |||||
8 | @end | ||||
9 | |||||
10 | @interface YY | ||||
11 | |||||
12 | + (void)classMethod; | ||||
13 | |||||
14 | @end | ||||
15 | |||||
16 | @implementation YY | ||||
17 | |||||
18 | static XX *obj; | ||||
19 | |||||
20 | + (void)classMethod { | ||||
21 | [obj addObserver:self]; | ||||
22 | Class whatever; | ||||
23 | [obj addObserver:whatever]; // GCC warns about this. | ||||
24 | } | ||||
25 | @end | ||||
26 |