summaryrefslogtreecommitdiffstats
path: root/test/Index/complete-macros.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-05 16:10:30 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-05 16:10:30 +0000
commit09d9fa1933499cb2808cd97b2db16ee11a990ef9 (patch)
tree2c36d9535add0d1a82e90f2640207f46f6726fe0 /test/Index/complete-macros.c
parent7b73b92870aa6271ac3d0a91eca83f6dde68c904 (diff)
Code completion results that refer to macros now get the cursor kind
of macro definitions when passed to CIndex. Add test for code completion of macros via CIndex. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/complete-macros.c')
-rw-r--r--test/Index/complete-macros.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Index/complete-macros.c b/test/Index/complete-macros.c
new file mode 100644
index 0000000000..c33d8c02e1
--- /dev/null
+++ b/test/Index/complete-macros.c
@@ -0,0 +1,11 @@
+// Note: the run lines follow their respective tests, since line/column
+// matter in this test.
+
+#define FOO(Arg1,Arg2) foobar
+
+void f() {
+
+}
+
+// RUN: c-index-test -code-completion-at=%s:7:1 %s | FileCheck -check-prefix=CHECK-CC1 %s
+// CHECK-CC1: macro definition:{TypedText FOO}{LeftParen (}{Placeholder Arg1}{Comma , }{Placeholder Arg2}{RightParen )}