blob: 06c9a408c5cec7c740b07f77a2719d88973c88df [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00001// 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 Kyrtzidis3e8efd92009-07-21 00:06:46 +00003
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00004// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:8:7 -print-decls > %t
5// RUN: cat %t | count 3
6// RUN: grep 'foo.h:4:6,' %t | count 2
7// RUN: grep 't2.c:5:6,' %t
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +00008
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00009// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:47 -print-decls > %t
10// RUN: cat %t | count 1
11// RUN: grep 't1.c:5:12,' %t
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000012
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000013// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:6:20 -print-decls > %t
14// RUN: cat %t | count 1
15// RUN: grep 't1.c:3:19,' %t
Argyrios Kyrtzidis12585542009-07-14 03:18:40 +000016
17// field test
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000018
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000019// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:21:6 -print-decls > %t
20// RUN: cat %t | count 1
21// RUN: grep 't1.c:12:7,' %t
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000022
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000023// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:22:21 -print-decls > %t
24// RUN: cat %t | count 1
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000025// RUN: grep 't1.c:16:7,' %t