blob: f7ba17c83dee666680858889697c8fe4f023faa6 [file] [log] [blame]
Douglas Gregor99a26af2010-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 Kyrtzidisbfb24252012-03-08 00:20:03 +000017- (void)protoMethod;
Douglas Gregor99a26af2010-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 Kyrtzidisbfb24252012-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
Douglas Gregor99a26af2010-10-01 20:25:15 +000039// RUN: c-index-test -test-load-source local %s | FileCheck %s
Argyrios Kyrtzidisa754a032012-03-23 03:33:19 +000040// CHECK: overrides.m:12:9: ObjCInstanceMethodDecl=protoMethod:12:9 [Overrides @3:9]
41// CHECK: overrides.m:22:9: ObjCInstanceMethodDecl=method:22:9 [Overrides @16:9]
42// CHECK: overrides.m:23:9: ObjCInstanceMethodDecl=protoMethod:23:9 [Overrides @12:9, @8:9, @32:9, @17:9]
43// CHECK: overrides.m:27:9: ObjCInstanceMethodDecl=method:27:9 (Definition) [Overrides @16:9]
44// CHECK: overrides.m:28:9: ObjCClassMethodDecl=methodWithParam::28:9 (Definition) [Overrides @18:9]
45// CHECK: overrides.m:32:9: ObjCInstanceMethodDecl=protoMethod:32:9 [Overrides @8:9]
46// CHECK: overrides.m:36:9: ObjCInstanceMethodDecl=protoMethod:36:9 [Overrides @12:9, @8:9, @32:9, @17:9]