Allow resolving headers from a PCH even after headers+PCH were moved to another path.
[clang.git] / test / SemaObjC / class-method-self.m
blobba70644ebae8ba61ef371515cef893dd62b65905
1 // RUN: %clang_cc1 -verify %s 
3 typedef struct objc_class *Class;
4 @interface XX
6 - (void)addObserver:(XX*)o; // expected-note 2{{passing argument to parameter 'o' here}}
8 @end
10 @interface YY
12 + (void)classMethod;
14 @end
16 @implementation YY
18 static XX *obj;
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 *'}}
25 @end