aboutsummaryrefslogtreecommitdiff
path: root/test/Index/objc-decls.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/objc-decls.m')
-rw-r--r--test/Index/objc-decls.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Index/objc-decls.m b/test/Index/objc-decls.m
new file mode 100644
index 000000000000..1a8ab4b5577e
--- /dev/null
+++ b/test/Index/objc-decls.m
@@ -0,0 +1,16 @@
+// RUN: clang-cc -emit-pch %S/t1.m -o %t1.m.ast &&
+// RUN: clang-cc -emit-pch %S/t2.m -o %t2.m.ast &&
+
+// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/t1.m:12:12 -print-decls > %t &&
+// RUN: cat %t | count 2 &&
+// RUN: grep 'objc.h:2:9,' %t | count 2 &&
+
+// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:5:13 -print-decls > %t &&
+// RUN: cat %t | count 3 &&
+// RUN: grep 'objc.h:5:1,' %t | count 2 &&
+// RUN: grep 't1.m:15:1,' %t | count 1 &&
+
+// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/objc.h:10:13 -print-decls > %t &&
+// RUN: cat %t | count 3 &&
+// RUN: grep 'objc.h:10:1,' %t | count 2 &&
+// RUN: grep 't2.m:11:1,' %t | count 1