summaryrefslogtreecommitdiffstats
path: root/test/Index/complete-preprocessor.m
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-24 22:20:20 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-24 22:20:20 +0000
commitf29c5233085a5af795c3c01b94d319e5b3235d56 (patch)
tree29a09575d6701839943ab6c54aab7ac4a476db0e /test/Index/complete-preprocessor.m
parentdb918646c0d549a48b85734cb735e094886890d2 (diff)
Implement code completion for preprocessor expressions and in macro
arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/complete-preprocessor.m')
-rw-r--r--test/Index/complete-preprocessor.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Index/complete-preprocessor.m b/test/Index/complete-preprocessor.m
index 14c4c150b3..d3a07d6f06 100644
--- a/test/Index/complete-preprocessor.m
+++ b/test/Index/complete-preprocessor.m
@@ -11,6 +11,8 @@
#if defined(FOO)
#endif
+FOO(in,t) value;
+
// RUN: c-index-test -code-completion-at=%s:4:2 %s | FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro} (30)
// CHECK-CC1-NEXT: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro}{LeftParen (}{Placeholder args}{RightParen )} (30)
@@ -55,3 +57,18 @@
// CHECK-CC3: NotImplemented:{TypedText FOO} (30)
// RUN: c-index-test -code-completion-at=%s:11:12 %s | FileCheck -check-prefix=CHECK-CC3 %s
// RUN: c-index-test -code-completion-at=%s:11:13 %s | FileCheck -check-prefix=CHECK-CC3 %s
+// RUN: c-index-test -code-completion-at=%s:11:5 %s | FileCheck -check-prefix=CHECK-CC4 %s
+// CHECK-CC4: macro definition:{TypedText BAR} (70)
+// CHECK-CC4: macro definition:{TypedText FOO}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (70)
+// RUN: c-index-test -code-completion-at=%s:14:5 %s | FileCheck -check-prefix=CHECK-CC5 %s
+// CHECK-CC5: NotImplemented:{TypedText const} (40)
+// CHECK-CC5: NotImplemented:{TypedText double} (40)
+// CHECK-CC5: NotImplemented:{TypedText enum} (40)
+// CHECK-CC5: NotImplemented:{TypedText extern} (30)
+// CHECK-CC5: NotImplemented:{TypedText float} (40)
+// CHECK-CC5: macro definition:{TypedText FOO}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (70)
+// CHECK-CC5: macro definition:{TypedText i386} (70)
+// CHECK-CC5: TypedefDecl:{TypedText id} (40)
+// CHECK-CC5: NotImplemented:{TypedText inline} (30)
+// CHECK-CC5: NotImplemented:{TypedText int} (40)
+// CHECK-CC5: NotImplemented:{TypedText long} (40)