Douglas Gregor | 9f59234 | 2010-10-01 20:25:15 +0000 | [diff] [blame] | 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; |
Argyrios Kyrtzidis | 044e645 | 2012-03-08 00:20:03 +0000 | [diff] [blame] | 17 | - (void)protoMethod; |
Douglas Gregor | 9f59234 | 2010-10-01 20:25:15 +0000 | [diff] [blame] | 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 | |
Argyrios Kyrtzidis | 044e645 | 2012-03-08 00:20:03 +0000 | [diff] [blame] | 31 | @protocol P4 <P3> |
| 32 | - (void)protoMethod; |
| 33 | @end |
| 34 | |
| 35 | @interface B(cat) <P4> |
| 36 | - (void)protoMethod; |
| 37 | @end |
| 38 | |
Argyrios Kyrtzidis | 15f4c98 | 2012-04-10 21:01:03 +0000 | [diff] [blame^] | 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 | |
Douglas Gregor | 9f59234 | 2010-10-01 20:25:15 +0000 | [diff] [blame] | 53 | // RUN: c-index-test -test-load-source local %s | FileCheck %s |
Argyrios Kyrtzidis | ccc6f36 | 2012-03-23 03:33:19 +0000 | [diff] [blame] | 54 | // 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 Kyrtzidis | 15f4c98 | 2012-04-10 21:01:03 +0000 | [diff] [blame^] | 61 | // CHECK: overrides.m:50:8: ObjCInstanceMethodDecl=meth:50:8 (Definition) [Overrides @43:8] |