1*f4a2713aSLionel Sambuc 2*f4a2713aSLionel Sambuc@protocol P1 3*f4a2713aSLionel Sambuc- (void)protoMethod; 4*f4a2713aSLionel Sambuc- (void)protoMethodWithParam:(int)param; 5*f4a2713aSLionel Sambuc@end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@protocol P3 8*f4a2713aSLionel Sambuc- (void)protoMethod; 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@protocol P2 <P1> 12*f4a2713aSLionel Sambuc- (void)protoMethod; 13*f4a2713aSLionel Sambuc@end 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@interface A 16*f4a2713aSLionel Sambuc- (void)method; 17*f4a2713aSLionel Sambuc- (void)protoMethod; 18*f4a2713aSLionel Sambuc+ (void)methodWithParam:(int)param; 19*f4a2713aSLionel Sambuc@end 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc@interface B : A <P2, P3> 22*f4a2713aSLionel Sambuc- (void)method; 23*f4a2713aSLionel Sambuc- (void)protoMethod; 24*f4a2713aSLionel Sambuc@end 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc@implementation B 27*f4a2713aSLionel Sambuc- (void)method { } 28*f4a2713aSLionel Sambuc+ (void)methodWithParam:(int)param { } 29*f4a2713aSLionel Sambuc@end 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc@protocol P4 <P3> 32*f4a2713aSLionel Sambuc- (void)protoMethod; 33*f4a2713aSLionel Sambuc@end 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc@interface B(cat) <P4> 36*f4a2713aSLionel Sambuc- (void)protoMethod; 37*f4a2713aSLionel Sambuc@end 38*f4a2713aSLionel Sambuc 39*f4a2713aSLionel Sambuc@interface B2 40*f4a2713aSLionel Sambuc@end 41*f4a2713aSLionel Sambuc 42*f4a2713aSLionel Sambuc@interface B2(cat) 43*f4a2713aSLionel Sambuc-(void)meth; 44*f4a2713aSLionel Sambuc@end 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuc@interface I2 : B2 47*f4a2713aSLionel Sambuc@end 48*f4a2713aSLionel Sambuc 49*f4a2713aSLionel Sambuc@implementation I2 50*f4a2713aSLionel Sambuc-(void)meth { } 51*f4a2713aSLionel Sambuc@end 52*f4a2713aSLionel Sambuc 53*f4a2713aSLionel Sambuc@protocol P5 54*f4a2713aSLionel Sambuc-(void)kol; 55*f4a2713aSLionel Sambuc-(void)kol; 56*f4a2713aSLionel Sambuc@end 57*f4a2713aSLionel Sambuc 58*f4a2713aSLionel Sambuc@protocol P6 59*f4a2713aSLionel Sambuc@property (readonly) id prop1; 60*f4a2713aSLionel Sambuc@property (readonly) id prop2; 61*f4a2713aSLionel Sambuc-(void)meth; 62*f4a2713aSLionel Sambuc@end 63*f4a2713aSLionel Sambuc 64*f4a2713aSLionel Sambuc@interface I3 <P6> 65*f4a2713aSLionel Sambuc@property (readwrite) id prop1; 66*f4a2713aSLionel Sambuc@property (readonly) id bar; 67*f4a2713aSLionel Sambuc@end 68*f4a2713aSLionel Sambuc 69*f4a2713aSLionel Sambuc@interface I3() 70*f4a2713aSLionel Sambuc@property (readwrite) id prop2; 71*f4a2713aSLionel Sambuc@property (readwrite) id bar; 72*f4a2713aSLionel Sambuc-(void)meth; 73*f4a2713aSLionel Sambuc@end 74*f4a2713aSLionel Sambuc 75*f4a2713aSLionel Sambuc@interface B4 76*f4a2713aSLionel Sambuc-(id)prop; 77*f4a2713aSLionel Sambuc-(void)setProp:(id)prop; 78*f4a2713aSLionel Sambuc@end 79*f4a2713aSLionel Sambuc 80*f4a2713aSLionel Sambuc@interface I4 : B4 81*f4a2713aSLionel Sambuc@property (assign) id prop; 82*f4a2713aSLionel Sambuc@end 83*f4a2713aSLionel Sambuc 84*f4a2713aSLionel Sambuc@interface B5 85*f4a2713aSLionel Sambuc@end 86*f4a2713aSLionel Sambuc 87*f4a2713aSLionel Sambuc@interface I5 : B5 88*f4a2713aSLionel Sambuc-(void)meth; 89*f4a2713aSLionel Sambuc@end 90*f4a2713aSLionel Sambuc 91*f4a2713aSLionel Sambuc@interface B5(cat) 92*f4a2713aSLionel Sambuc-(void)meth; 93*f4a2713aSLionel Sambuc@end 94*f4a2713aSLionel Sambuc 95*f4a2713aSLionel Sambuc@implementation I5 96*f4a2713aSLionel Sambuc-(void)meth{} 97*f4a2713aSLionel Sambuc@end 98*f4a2713aSLionel Sambuc 99*f4a2713aSLionel Sambuc// RUN: c-index-test -test-load-source local %s | FileCheck %s 100*f4a2713aSLionel Sambuc// CHECK: overrides.m:12:9: ObjCInstanceMethodDecl=protoMethod:12:9 [Overrides @3:9] 101*f4a2713aSLionel Sambuc// CHECK: overrides.m:22:9: ObjCInstanceMethodDecl=method:22:9 [Overrides @16:9] 102*f4a2713aSLionel Sambuc// CHECK: overrides.m:23:9: ObjCInstanceMethodDecl=protoMethod:23:9 [Overrides @8:9, @12:9, @17:9, @32:9] 103*f4a2713aSLionel Sambuc// CHECK: overrides.m:27:9: ObjCInstanceMethodDecl=method:27:9 (Definition) [Overrides @16:9] 104*f4a2713aSLionel Sambuc// CHECK: overrides.m:28:9: ObjCClassMethodDecl=methodWithParam::28:9 (Definition) [Overrides @18:9] 105*f4a2713aSLionel Sambuc// CHECK: overrides.m:32:9: ObjCInstanceMethodDecl=protoMethod:32:9 [Overrides @8:9] 106*f4a2713aSLionel Sambuc// CHECK: overrides.m:36:9: ObjCInstanceMethodDecl=protoMethod:36:9 [Overrides @8:9, @12:9, @17:9, @32:9] 107*f4a2713aSLionel Sambuc// CHECK: overrides.m:50:8: ObjCInstanceMethodDecl=meth:50:8 (Definition) [Overrides @43:8] 108*f4a2713aSLionel Sambuc// CHECK: overrides.m:55:8: ObjCInstanceMethodDecl=kol:55:8 Extent=[55:1 - 55:12] 109*f4a2713aSLionel Sambuc// CHECK: overrides.m:65:26: ObjCInstanceMethodDecl=prop1:65:26 [Overrides @59:25] Extent=[65:26 - 65:31] 110*f4a2713aSLionel Sambuc// CHECK: overrides.m:65:26: ObjCInstanceMethodDecl=setProp1::65:26 Extent=[65:26 - 65:31] 111*f4a2713aSLionel Sambuc// CHECK: overrides.m:70:26: ObjCInstanceMethodDecl=prop2:70:26 [Overrides @60:25] Extent=[70:26 - 70:31] 112*f4a2713aSLionel Sambuc// CHECK: overrides.m:70:26: ObjCInstanceMethodDecl=setProp2::70:26 Extent=[70:26 - 70:31] 113*f4a2713aSLionel Sambuc// CHECK: overrides.m:71:26: ObjCInstanceMethodDecl=setBar::71:26 Extent=[71:26 - 71:29] 114*f4a2713aSLionel Sambuc// CHECK: overrides.m:72:8: ObjCInstanceMethodDecl=meth:72:8 [Overrides @61:8] Extent=[72:1 - 72:13] 115*f4a2713aSLionel Sambuc// CHECK: overrides.m:81:23: ObjCInstanceMethodDecl=prop:81:23 [Overrides @76:6] Extent=[81:23 - 81:27] 116*f4a2713aSLionel Sambuc// CHECK: overrides.m:81:23: ObjCInstanceMethodDecl=setProp::81:23 [Overrides @77:8] Extent=[81:23 - 81:27] 117*f4a2713aSLionel Sambuc// CHECK: overrides.m:92:8: ObjCInstanceMethodDecl=meth:92:8 Extent=[92:1 - 92:13] 118*f4a2713aSLionel Sambuc// CHECK: overrides.m:95:17: ObjCImplementationDecl=I5:95:17 (Definition) Extent=[95:1 - 97:2] 119*f4a2713aSLionel Sambuc// CHECK: overrides.m:96:8: ObjCInstanceMethodDecl=meth:96:8 (Definition) [Overrides @92:8] Extent=[96:1 - 96:14] 120