Argyrios Kyrtzidis | c14a03d | 2011-11-23 20:27:36 +0000 | [diff] [blame] | 1 | @interface Foo |
| 2 | void func1(int); |
| 3 | void func2(int); |
| 4 | |
| 5 | -(void)meth1; |
| 6 | -(void)meth2; |
| 7 | @end |
| 8 | |
| 9 | @implementation Foo |
| 10 | void func(int); |
| 11 | static int glob1; |
| 12 | static int glob2; |
| 13 | |
| 14 | -(void)meth1 {} |
| 15 | -(void)meth2 {} |
| 16 | @end |
| 17 | |
| 18 | // RUN: c-index-test -write-pch %t.h.pch -x objective-c-header %s.h |
| 19 | |
| 20 | // RUN: c-index-test -test-annotate-tokens=%s:5:1:7:1 %s -include %t.h \ |
| 21 | // RUN: | FileCheck -check-prefix=INTER %s |
Argyrios Kyrtzidis | ccc6f36 | 2012-03-23 03:33:19 +0000 | [diff] [blame] | 22 | // CHECK-INTER: Identifier: "meth1" [5:8 - 5:13] ObjCInstanceMethodDecl=meth1:5:8 |
| 23 | // CHECK-INTER: Identifier: "meth2" [6:8 - 6:13] ObjCInstanceMethodDecl=meth2:6:8 |
Argyrios Kyrtzidis | c14a03d | 2011-11-23 20:27:36 +0000 | [diff] [blame] | 24 | |
| 25 | // RUN: c-index-test -test-annotate-tokens=%s:14:1:16:1 %s -include %t.h \ |
| 26 | // RUN: | FileCheck -check-prefix=IMPL %s |
Argyrios Kyrtzidis | ccc6f36 | 2012-03-23 03:33:19 +0000 | [diff] [blame] | 27 | // CHECK-IMPL: Identifier: "meth1" [14:8 - 14:13] ObjCInstanceMethodDecl=meth1:14:8 (Definition) |
| 28 | // CHECK-IMPL: Identifier: "meth2" [15:8 - 15:13] ObjCInstanceMethodDecl=meth2:15:8 (Definition) |
Argyrios Kyrtzidis | c14a03d | 2011-11-23 20:27:36 +0000 | [diff] [blame] | 29 | |
Argyrios Kyrtzidis | bcf8df8 | 2011-11-23 21:11:23 +0000 | [diff] [blame] | 30 | // RUN: c-index-test -test-annotate-tokens=%s.h:7:1:9:1 %s -include %t.h \ |
Argyrios Kyrtzidis | c14a03d | 2011-11-23 20:27:36 +0000 | [diff] [blame] | 31 | // RUN: | FileCheck -check-prefix=PCH %s |
Argyrios Kyrtzidis | ccc6f36 | 2012-03-23 03:33:19 +0000 | [diff] [blame] | 32 | // CHECK-PCH: Identifier: "meth1" [7:8 - 7:13] ObjCInstanceMethodDecl=meth1:7:8 |
| 33 | // CHECK-PCH: Identifier: "meth2" [8:8 - 8:13] ObjCInstanceMethodDecl=meth2:8:8 |