Mercurial > hg > CbC > CbC_llvm
comparison clang/test/SemaObjC/qualified-protocol-method-conflicts.m @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // RUN: %clang_cc1 -Woverriding-method-mismatch -fsyntax-only -verify -Wno-objc-root-class %s | |
2 // rdar://6191214 | |
3 | |
4 @protocol Xint | |
5 -(void) setX: (int) arg0; // expected-note {{previous declaration is here}} | |
6 +(int) C; // expected-note {{previous declaration is here}} | |
7 @end | |
8 | |
9 @protocol Xfloat | |
10 -(void) setX: (float) arg0; // expected-note 2 {{previous declaration is here}} | |
11 +(float) C; // expected-note 2 {{previous declaration is here}} | |
12 @end | |
13 | |
14 @interface A <Xint, Xfloat> | |
15 @end | |
16 | |
17 @implementation A | |
18 -(void) setX: (int) arg0 { } // expected-warning {{conflicting parameter types in declaration of 'setX:': 'float' vs 'int'}} | |
19 +(int) C {return 0; } // expected-warning {{conflicting return type in declaration of 'C': 'float' vs 'int'}} | |
20 @end | |
21 | |
22 @interface B <Xfloat, Xint> | |
23 @end | |
24 | |
25 @implementation B | |
26 -(void) setX: (float) arg0 { } // expected-warning {{conflicting parameter types in declaration of 'setX:': 'int' vs 'float'}} | |
27 + (float) C {return 0.0; } // expected-warning {{conflicting return type in declaration of 'C': 'int' vs 'float'}} | |
28 @end | |
29 | |
30 @protocol Xint_float<Xint, Xfloat> | |
31 @end | |
32 | |
33 @interface C<Xint_float> | |
34 @end | |
35 | |
36 @implementation C | |
37 -(void) setX: (int) arg0 { } // expected-warning {{conflicting parameter types in declaration of 'setX:': 'float' vs 'int'}} | |
38 + (int) C {return 0;} // expected-warning {{conflicting return type in declaration of 'C': 'float' vs 'int'}} | |
39 @end |