blob: 5212c24695ce6101dad241fb62ae2590c1eb7645 [file] [log] [blame]
Argyrios Kyrtzidis921bd262009-07-06 00:03:47 +00001// RUN: clang-cc -emit-pch %S/t1.c -o %t1.ast &&
2// RUN: clang-cc -emit-pch %S/t2.c -o %t2.ast &&
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +00003
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 Kyrtzidis12585542009-07-14 03:18:40 +000031
32// field test
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000033
Argyrios Kyrtzidis12585542009-07-14 03:18:40 +000034// FIXME: References point at the start of MemberExpr, make them point at the field instead.
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000035// 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