[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaObjC / method-typecheck-3.m
blob1999b7d47702e0ad81d40eb868a9e9f9920d1638
1 // RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
3 @class B;
4 @interface A
5 - (B*)obj;
6 - (B*)a; // expected-note {{previous definition is here}}
7 - (void)takesA: (A*)a; // expected-note {{previous definition is here}}
8 - (void)takesId: (id)a; // expected-note {{previous definition is here}}
9 @end
12 @interface B : A
13 @end
15 @implementation B
16 - (id)obj {return self;} // 'id' overrides are white-listed?
17 - (A*)a { return self;}  // expected-warning {{conflicting return type in implementation of 'a'}}
18 - (void)takesA: (B*)a  // expected-warning {{conflicting parameter types in implementation of 'takesA:'}}
20 - (void)takesId: (B*)a // expected-warning {{conflicting parameter types in implementation of 'takesId:'}}
22 @end