Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast |
| 2 | // RUN: clang-cc -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 3 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 4 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:1:14 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 5 | // RUN: cat %t | count 4 |
| 6 | // RUN: grep 't1.c:4:19,' %t |
| 7 | // RUN: grep 't1.c:28:40,' %t |
| 8 | // RUN: grep 't2.c:6:3,' %t |
| 9 | // RUN: grep 't2.c:7:12,' %t |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 10 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 11 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:3:9 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 12 | // RUN: cat %t | count 1 |
| 13 | // RUN: grep 't2.c:7:3,' %t |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 14 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 15 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:4:9 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 16 | // RUN: cat %t | count 1 |
| 17 | // RUN: grep 't1.c:8:3,' %t |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 18 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 19 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:3:22 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 20 | // RUN: cat %t | count 1 |
| 21 | // RUN: grep 't1.c:6:17,' %t |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 22 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 23 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:4:11 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 24 | // RUN: cat %t | count 1 |
| 25 | // RUN: grep 't1.c:6:5,' %t |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 26 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 27 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:5:30 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 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. |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 36 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:12:7 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 37 | // RUN: cat %t | count 1 |
| 38 | // RUN: grep 't1.c:21:3,' %t |
Argyrios Kyrtzidis | 3e8efd9 | 2009-07-21 00:06:46 +0000 | [diff] [blame] | 39 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 40 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:16:7 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 41 | // RUN: cat %t | count 1 |
| 42 | // RUN: grep 't1.c:22:3,' %t |
Argyrios Kyrtzidis | f7cf15c | 2009-07-21 00:07:06 +0000 | [diff] [blame] | 43 | |
Daniel Dunbar | 1787b70 | 2009-11-08 01:46:19 +0000 | [diff] [blame^] | 44 | // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:7:11 -print-refs > %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 45 | // RUN: cat %t | count 2 |
| 46 | // RUN: grep 't1.c:25:3,' %t |
Argyrios Kyrtzidis | f7cf15c | 2009-07-21 00:07:06 +0000 | [diff] [blame] | 47 | // RUN: grep 't2.c:10:3,' %t |