1// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
2
3typedef struct objc_class *Class;
4@interface XX
5
6- (void)addObserver:(XX*)o; // expected-note 2{{passing argument to parameter 'o' here}}
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];     // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}}
22  Class whatever;
23  [obj addObserver:whatever]; // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}}
24}
25@end
26
27