diff options
Diffstat (limited to 'test/Index/find-decls.c')
-rw-r--r-- | test/Index/find-decls.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Index/find-decls.c b/test/Index/find-decls.c new file mode 100644 index 000000000000..50a233d75ba5 --- /dev/null +++ b/test/Index/find-decls.c @@ -0,0 +1,25 @@ +// RUN: clang-cc -fblocks -emit-pch %S/t1.c -o %t1.ast && +// RUN: clang-cc -fblocks -emit-pch %S/t2.c -o %t2.ast && + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:8:7 -print-decls > %t && +// RUN: cat %t | count 3 && +// RUN: grep 'foo.h:4:6,' %t | count 2 && +// RUN: grep 't2.c:5:6,' %t && + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:5:47 -print-decls > %t && +// RUN: cat %t | count 1 && +// RUN: grep 't1.c:5:12,' %t && + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:6:20 -print-decls > %t && +// RUN: cat %t | count 1 && +// RUN: grep 't1.c:3:19,' %t && + +// field test + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:21:6 -print-decls > %t && +// RUN: cat %t | count 1 && +// RUN: grep 't1.c:12:7,' %t && + +// RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:22:21 -print-decls > %t && +// RUN: cat %t | count 1 && +// RUN: grep 't1.c:16:7,' %t |