blob: 71509baf9012e253ed0f9fb0640c7dbe32695b43 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -verify %s
Steve Naroffd824c9c2009-04-14 15:11:46 +00002
3typedef 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
18static 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