summaryrefslogtreecommitdiff
path: root/clang/test/Index/get-cursor-macro-args.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Index/get-cursor-macro-args.m')
-rw-r--r--clang/test/Index/get-cursor-macro-args.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Index/get-cursor-macro-args.m b/clang/test/Index/get-cursor-macro-args.m
new file mode 100644
index 0000000..4945fd3
--- /dev/null
+++ b/clang/test/Index/get-cursor-macro-args.m
@@ -0,0 +1,19 @@
+// Test without PCH
+// RUN: c-index-test -cursor-at=%S/get-cursor-macro-args.h:9:12 \
+// RUN: -cursor-at=%S/get-cursor-macro-args.h:9:21 \
+// RUN: -cursor-at=%S/get-cursor-macro-args.h:15:12 \
+// RUN: -cursor-at=%S/get-cursor-macro-args.h:15:20 \
+// RUN: %s -include get-cursor-macro-args.h | FileCheck %s
+
+// Test with PCH
+// RUN: c-index-test -write-pch %t.pch -x objective-c-header %S/get-cursor-macro-args.h
+// RUN: c-index-test -cursor-at=%S/get-cursor-macro-args.h:9:12 \
+// RUN: -cursor-at=%S/get-cursor-macro-args.h:9:21 \
+// RUN: -cursor-at=%S/get-cursor-macro-args.h:15:12 \
+// RUN: -cursor-at=%S/get-cursor-macro-args.h:15:20 \
+// RUN: %s -include-pch %t.pch | FileCheck %s
+
+// CHECK: ObjCClassRef=MyClass:1:12
+// CHECK-NEXT: ObjCMessageExpr=meth:2:8
+// CHECK-NEXT: ObjCMessageExpr=meth:2:8
+// CHECK-NEXT: ObjCClassRef=MyClass:1:12