[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / qualified-protocol-method-conflicts.m
blobd1d5612ef0edd9c38215c849cbf8b6e01c29d097
1 // RUN: %clang_cc1  -Woverriding-method-mismatch -fsyntax-only -verify -Wno-objc-root-class %s
2 // rdar://6191214
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
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
14 @interface A <Xint, Xfloat>
15 @end
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
22 @interface B <Xfloat, Xint>
23 @end
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
30 @protocol Xint_float<Xint, Xfloat>
31 @end
33 @interface C<Xint_float>
34 @end
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