xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/selector-overload.m (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc// RUN: %clang_cc1 %s -fsyntax-only
2*0a6a1f1dSLionel Sambuc// FIXME: This test needs needs to be run with -verify
3f4a2713aSLionel Sambuc
4f4a2713aSLionel Sambuc@interface NSObject
5f4a2713aSLionel Sambuc+ alloc;
6f4a2713aSLionel Sambuc- init;
7f4a2713aSLionel Sambuc@end
8f4a2713aSLionel Sambuc
9f4a2713aSLionel Sambucstruct D {
10f4a2713aSLionel Sambuc  double d;
11f4a2713aSLionel Sambuc};
12f4a2713aSLionel Sambuc
13f4a2713aSLionel Sambuc@interface Foo : NSObject
14f4a2713aSLionel Sambuc
15f4a2713aSLionel Sambuc- method:(int)a;
16f4a2713aSLionel Sambuc- method:(int)a;
17f4a2713aSLionel Sambuc
18f4a2713aSLionel Sambuc@end
19f4a2713aSLionel Sambuc
20f4a2713aSLionel Sambuc@interface Bar : NSObject
21f4a2713aSLionel Sambuc
22f4a2713aSLionel Sambuc- method:(void *)a;
23f4a2713aSLionel Sambuc
24f4a2713aSLionel Sambuc@end
25f4a2713aSLionel Sambuc
26f4a2713aSLionel Sambuc@interface Car : NSObject
27f4a2713aSLionel Sambuc
28f4a2713aSLionel Sambuc- method:(struct D)a;
29f4a2713aSLionel Sambuc
30f4a2713aSLionel Sambuc@end
31f4a2713aSLionel Sambuc
32f4a2713aSLionel Sambuc@interface Zar : NSObject
33f4a2713aSLionel Sambuc
34f4a2713aSLionel Sambuc- method:(float)a;
35f4a2713aSLionel Sambuc
36f4a2713aSLionel Sambuc@end
37f4a2713aSLionel Sambuc
38f4a2713aSLionel Sambuc@interface Rar : NSObject
39f4a2713aSLionel Sambuc
40f4a2713aSLionel Sambuc- method:(float)a;
41f4a2713aSLionel Sambuc
42f4a2713aSLionel Sambuc@end
43f4a2713aSLionel Sambuc
44f4a2713aSLionel Sambucint main() {
45f4a2713aSLionel Sambuc  id xx = [[Car alloc] init]; // expected-warning {{incompatible types assigning 'int' to 'id'}}
46f4a2713aSLionel Sambuc
47f4a2713aSLionel Sambuc  [xx method:4];
48f4a2713aSLionel Sambuc}
49