annotate clang/test/SemaObjC/qualified-protocol-method-conflicts.m @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -Woverriding-method-mismatch -fsyntax-only -verify -Wno-objc-root-class %s
anatofuz
parents:
diff changeset
2 // rdar://6191214
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @protocol Xint
anatofuz
parents:
diff changeset
5 -(void) setX: (int) arg0; // expected-note {{previous declaration is here}}
anatofuz
parents:
diff changeset
6 +(int) C; // expected-note {{previous declaration is here}}
anatofuz
parents:
diff changeset
7 @end
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 @protocol Xfloat
anatofuz
parents:
diff changeset
10 -(void) setX: (float) arg0; // expected-note 2 {{previous declaration is here}}
anatofuz
parents:
diff changeset
11 +(float) C; // expected-note 2 {{previous declaration is here}}
anatofuz
parents:
diff changeset
12 @end
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 @interface A <Xint, Xfloat>
anatofuz
parents:
diff changeset
15 @end
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 @implementation A
anatofuz
parents:
diff changeset
18 -(void) setX: (int) arg0 { } // expected-warning {{conflicting parameter types in declaration of 'setX:': 'float' vs 'int'}}
anatofuz
parents:
diff changeset
19 +(int) C {return 0; } // expected-warning {{conflicting return type in declaration of 'C': 'float' vs 'int'}}
anatofuz
parents:
diff changeset
20 @end
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 @interface B <Xfloat, Xint>
anatofuz
parents:
diff changeset
23 @end
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 @implementation B
anatofuz
parents:
diff changeset
26 -(void) setX: (float) arg0 { } // expected-warning {{conflicting parameter types in declaration of 'setX:': 'int' vs 'float'}}
anatofuz
parents:
diff changeset
27 + (float) C {return 0.0; } // expected-warning {{conflicting return type in declaration of 'C': 'int' vs 'float'}}
anatofuz
parents:
diff changeset
28 @end
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 @protocol Xint_float<Xint, Xfloat>
anatofuz
parents:
diff changeset
31 @end
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33 @interface C<Xint_float>
anatofuz
parents:
diff changeset
34 @end
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 @implementation C
anatofuz
parents:
diff changeset
37 -(void) setX: (int) arg0 { } // expected-warning {{conflicting parameter types in declaration of 'setX:': 'float' vs 'int'}}
anatofuz
parents:
diff changeset
38 + (int) C {return 0;} // expected-warning {{conflicting return type in declaration of 'C': 'float' vs 'int'}}
anatofuz
parents:
diff changeset
39 @end