Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaObjC / class-method-self.m
blob821160c884144f6f5010b855f5c248ecec2ed8a8
1 // RUN: %clang_cc1 -verify -Wno-objc-root-class %s
3 @interface XX
5 - (void)addObserver:(XX*)o; // expected-note 2{{passing argument to parameter 'o' here}}
7 @end
9 @interface YY
11 + (void)classMethod;
13 @end
15 @implementation YY
17 static XX *obj;
19 + (void)classMethod {
20   [obj addObserver:self];     // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}}
21   Class whatever;
22   [obj addObserver:whatever]; // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}}
24 @end