blob: 69087545637118fb05ad423234d397ca12560024 [file] [log] [blame]
Douglas Gregor9f592342010-10-01 20:25:15 +00001
2@protocol P1
3- (void)protoMethod;
4- (void)protoMethodWithParam:(int)param;
5@end
6
7@protocol P3
8- (void)protoMethod;
9@end
10
11@protocol P2 <P1>
12- (void)protoMethod;
13@end
14
15@interface A
16- (void)method;
Argyrios Kyrtzidis044e6452012-03-08 00:20:03 +000017- (void)protoMethod;
Douglas Gregor9f592342010-10-01 20:25:15 +000018+ (void)methodWithParam:(int)param;
19@end
20
21@interface B : A <P2, P3>
22- (void)method;
23- (void)protoMethod;
24@end
25
26@implementation B
27- (void)method { }
28+ (void)methodWithParam:(int)param { }
29@end
30
Argyrios Kyrtzidis044e6452012-03-08 00:20:03 +000031@protocol P4 <P3>
32- (void)protoMethod;
33@end
34
35@interface B(cat) <P4>
36- (void)protoMethod;
37@end
38
Argyrios Kyrtzidis15f4c982012-04-10 21:01:03 +000039@interface B2
40@end
41
42@interface B2(cat)
43-(void)meth;
44@end
45
46@interface I2 : B2
47@end
48
49@implementation I2
50-(void)meth { }
51@end
52
Douglas Gregor9f592342010-10-01 20:25:15 +000053// RUN: c-index-test -test-load-source local %s | FileCheck %s
Argyrios Kyrtzidisccc6f362012-03-23 03:33:19 +000054// CHECK: overrides.m:12:9: ObjCInstanceMethodDecl=protoMethod:12:9 [Overrides @3:9]
55// CHECK: overrides.m:22:9: ObjCInstanceMethodDecl=method:22:9 [Overrides @16:9]
56// CHECK: overrides.m:23:9: ObjCInstanceMethodDecl=protoMethod:23:9 [Overrides @12:9, @8:9, @32:9, @17:9]
57// CHECK: overrides.m:27:9: ObjCInstanceMethodDecl=method:27:9 (Definition) [Overrides @16:9]
58// CHECK: overrides.m:28:9: ObjCClassMethodDecl=methodWithParam::28:9 (Definition) [Overrides @18:9]
59// CHECK: overrides.m:32:9: ObjCInstanceMethodDecl=protoMethod:32:9 [Overrides @8:9]
60// CHECK: overrides.m:36:9: ObjCInstanceMethodDecl=protoMethod:36:9 [Overrides @12:9, @8:9, @32:9, @17:9]
Argyrios Kyrtzidis15f4c982012-04-10 21:01:03 +000061// CHECK: overrides.m:50:8: ObjCInstanceMethodDecl=meth:50:8 (Definition) [Overrides @43:8]