blob: 99a32428005b187a2c409d933e6fcdc2f93c1b13 [file] [log] [blame]
Daniel Dunbar1787b702009-11-08 01:46:19 +00001// 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 Kyrtzidis3e8efd92009-07-21 00:06:46 +00003
Daniel Dunbar1787b702009-11-08 01:46:19 +00004// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:8:7 -print-decls > %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00005// 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 Dunbar1787b702009-11-08 01:46:19 +00009// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:5:47 -print-decls > %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000010// RUN: cat %t | count 1
11// RUN: grep 't1.c:5:12,' %t
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000012
Daniel Dunbar1787b702009-11-08 01:46:19 +000013// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:6:20 -print-decls > %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000014// 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 Dunbar1787b702009-11-08 01:46:19 +000019// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:21:6 -print-decls > %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000020// RUN: cat %t | count 1
21// RUN: grep 't1.c:12:7,' %t
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000022
Daniel Dunbar1787b702009-11-08 01:46:19 +000023// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:22:21 -print-decls > %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000024// RUN: cat %t | count 1
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000025// RUN: grep 't1.c:16:7,' %t