Daniel Dunbar | 218e0b7 | 2009-07-30 02:43:05 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast && |
| 2 | // RUN: clang-cc -fblocks -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 && |
Argyrios Kyrtzidis | ad6e5d1 | 2009-07-29 23:40:48 +0000 | [diff] [blame] | 5 | // RUN: cat %t | count 4 && |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 6 | // RUN: grep 't1.c:4:19,' %t && |
Argyrios Kyrtzidis | ad6e5d1 | 2009-07-29 23:40:48 +0000 | [diff] [blame] | 7 | // RUN: grep 't1.c:28:40,' %t && |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 8 | // RUN: grep 't2.c:6:3,' %t && |
| 9 | // RUN: grep 't2.c:7:12,' %t && |
| 10 | |
| 11 | // RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:3:9 -print-refs > %t && |
| 12 | // RUN: cat %t | count 1 && |
| 13 | // RUN: grep 't2.c:7:3,' %t && |
| 14 | |
| 15 | // RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:4:9 -print-refs > %t && |
| 16 | // RUN: cat %t | count 1 && |
| 17 | // RUN: grep 't1.c:8:3,' %t && |
| 18 | |
| 19 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:3:22 -print-refs > %t && |
| 20 | // RUN: cat %t | count 1 && |
| 21 | // RUN: grep 't1.c:6:17,' %t && |
| 22 | |
| 23 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:4:11 -print-refs > %t && |
| 24 | // RUN: cat %t | count 1 && |
| 25 | // RUN: grep 't1.c:6:5,' %t && |
| 26 | |
| 27 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:30 -print-refs > %t && |
| 28 | // RUN: cat %t | count 3 && |
| 29 | // RUN: grep 't1.c:5:27,' %t && |
| 30 | // RUN: grep 't1.c:5:44,' %t && |
| 31 | // RUN: grep 't1.c:6:26,' %t && |
Argyrios Kyrtzidis | 1258554 | 2009-07-14 03:18:40 +0000 | [diff] [blame] | 32 | |
| 33 | // field test |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 34 | |
Argyrios Kyrtzidis | 1258554 | 2009-07-14 03:18:40 +0000 | [diff] [blame] | 35 | // 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] | 36 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:12:7 -print-refs > %t && |
| 37 | // RUN: cat %t | count 1 && |
| 38 | // RUN: grep 't1.c:21:3,' %t && |
| 39 | |
| 40 | // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:16:7 -print-refs > %t && |
| 41 | // RUN: cat %t | count 1 && |
Daniel Dunbar | 025f80d | 2009-07-25 11:27:37 +0000 | [diff] [blame] | 42 | // RUN: grep 't1.c:22:3,' %t && |
Argyrios Kyrtzidis | f7cf15c | 2009-07-21 00:07:06 +0000 | [diff] [blame] | 43 | |
| 44 | // RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:7:11 -print-refs > %t && |
| 45 | // RUN: cat %t | count 2 && |
| 46 | // RUN: grep 't1.c:25:3,' %t && |
| 47 | // RUN: grep 't2.c:10:3,' %t |