Argyrios Kyrtzidis | 921bd26 | 2009-07-06 00:03:47 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -emit-pch %S/t1.c -o %t1.ast && |
| 2 | // RUN: clang-cc -emit-pch %S/t2.c -o %t2.ast && |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 3 | |
| 4 | // RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:1:14 -print-refs > %t && |
| 5 | // RUN: cat %t | count 3 && |
| 6 | // RUN: grep 't1.c:4:19,' %t && |
| 7 | // RUN: grep 't2.c:6:3,' %t && |
| 8 | // RUN: grep 't2.c:7:12,' %t && |
| 9 | |
| 10 | // RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:3:9 -print-refs > %t && |
| 11 | // RUN: cat %t | count 1 && |
| 12 | // RUN: grep 't2.c:7:3,' %t && |
| 13 | |
| 14 | // RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:4:9 -print-refs > %t && |
| 15 | // RUN: cat %t | count 1 && |
| 16 | // RUN: grep 't1.c:8:3,' %t && |
| 17 | |
| 18 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:3:22 -print-refs > %t && |
| 19 | // RUN: cat %t | count 1 && |
| 20 | // RUN: grep 't1.c:6:17,' %t && |
| 21 | |
| 22 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:4:11 -print-refs > %t && |
| 23 | // RUN: cat %t | count 1 && |
| 24 | // RUN: grep 't1.c:6:5,' %t && |
| 25 | |
| 26 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:30 -print-refs > %t && |
| 27 | // RUN: cat %t | count 3 && |
| 28 | // RUN: grep 't1.c:5:27,' %t && |
| 29 | // RUN: grep 't1.c:5:44,' %t && |
| 30 | // RUN: grep 't1.c:6:26,' %t && |
Argyrios Kyrtzidis | 1258554 | 2009-07-14 03:18:40 +0000 | [diff] [blame] | 31 | |
| 32 | // field test |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 33 | |
Argyrios Kyrtzidis | 1258554 | 2009-07-14 03:18:40 +0000 | [diff] [blame] | 34 | // FIXME: References point at the start of MemberExpr, make them point at the field instead. |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 35 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:12:7 -print-refs > %t && |
| 36 | // RUN: cat %t | count 1 && |
| 37 | // RUN: grep 't1.c:21:3,' %t && |
| 38 | |
| 39 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:16:7 -print-refs > %t && |
| 40 | // RUN: cat %t | count 1 && |
| 41 | // RUN: grep 't1.c:22:3,' %t |