Fix the clang-wpa example.
[clang.git] / test / SemaObjC / method-typecheck-2.m
blob84efa0b2209117f6003f9af078e08474fc23f8b0
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @protocol P
4 - (void) doSomethingInProtocol: (float) x; // expected-note {{previous definition is here}}
5 + (void) doSomethingClassyInProtocol: (float) x; // expected-note {{previous definition is here}}
6 - (void) doNothingInProtocol : (float) x;
7 + (void) doNothingClassyInProtocol : (float) x;
8 @end
10 @interface I <P>
11 - (void) doSomething: (float) x; // expected-note {{previous definition is here}}
12 + (void) doSomethingClassy: (int) x; // expected-note {{previous definition is here}}
13 @end
15 @interface Bar : I
16 @end
18 @implementation Bar
19 - (void) doSomething: (int) x {} // expected-warning {{conflicting parameter types}}
20 + (void) doSomethingClassy: (float) x{}  // expected-warning {{conflicting parameter types}}
21 - (void) doSomethingInProtocol: (id) x {}  // expected-warning {{conflicting parameter types}}
22 + (void) doSomethingClassyInProtocol: (id) x {}  // expected-warning {{conflicting parameter types}}
23 @end