blob: 9a898e152a7fe88b35278288e1c23ebb8c681de0 [file] [log] [blame]
Douglas Gregorf3df9852010-04-05 16:10:30 +00001// Note: the run lines follow their respective tests, since line/column
2// matter in this test.
3
4#define FOO(Arg1,Arg2) foobar
Douglas Gregor55b037b2010-07-08 20:55:51 +00005#define nil 0
Douglas Gregorf3df9852010-04-05 16:10:30 +00006void f() {
7
8}
9
Douglas Gregor55b037b2010-07-08 20:55:51 +000010void g(int);
11
12void f2() {
13 int *ip = nil;
14 ip = nil;
15 g(nil);
16}
17
Douglas Gregorf3df9852010-04-05 16:10:30 +000018// RUN: c-index-test -code-completion-at=%s:7:1 %s | FileCheck -check-prefix=CHECK-CC1 %s
19// CHECK-CC1: macro definition:{TypedText FOO}{LeftParen (}{Placeholder Arg1}{Comma , }{Placeholder Arg2}{RightParen )}
Douglas Gregor55b037b2010-07-08 20:55:51 +000020// RUN: c-index-test -code-completion-at=%s:13:13 %s | FileCheck -check-prefix=CHECK-CC2 %s
21// RUN: c-index-test -code-completion-at=%s:14:8 %s | FileCheck -check-prefix=CHECK-CC2 %s
22// CHECK-CC2: macro definition:{TypedText nil} (30)
23// RUN: c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC3 %s
24// CHECK-CC3: macro definition:{TypedText nil} (60)