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