Douglas Gregor | 09d9fa1 | 2010-04-05 16:10:30 +0000 | [diff] [blame] | 1 | // Note: the run lines follow their respective tests, since line/column |
| 2 | // matter in this test. |
| 3 | |
| 4 | #define FOO(Arg1,Arg2) foobar |
Douglas Gregor | 590c7d5 | 2010-07-08 20:55:51 +0000 | [diff] [blame] | 5 | #define nil 0 |
Douglas Gregor | 09d9fa1 | 2010-04-05 16:10:30 +0000 | [diff] [blame] | 6 | void f() { |
| 7 | |
| 8 | } |
| 9 | |
Douglas Gregor | 590c7d5 | 2010-07-08 20:55:51 +0000 | [diff] [blame] | 10 | void g(int); |
| 11 | |
| 12 | void f2() { |
| 13 | int *ip = nil; |
| 14 | ip = nil; |
| 15 | g(nil); |
| 16 | } |
| 17 | |
Douglas Gregor | 09d9fa1 | 2010-04-05 16:10:30 +0000 | [diff] [blame] | 18 | // RUN: c-index-test -code-completion-at=%s:7:1 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | 87c08a5 | 2010-08-13 22:48:40 +0000 | [diff] [blame] | 19 | // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:1 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | 09d9fa1 | 2010-04-05 16:10:30 +0000 | [diff] [blame] | 20 | // CHECK-CC1: macro definition:{TypedText FOO}{LeftParen (}{Placeholder Arg1}{Comma , }{Placeholder Arg2}{RightParen )} |
Douglas Gregor | 590c7d5 | 2010-07-08 20:55:51 +0000 | [diff] [blame] | 21 | // RUN: c-index-test -code-completion-at=%s:13:13 %s | FileCheck -check-prefix=CHECK-CC2 %s |
| 22 | // RUN: c-index-test -code-completion-at=%s:14:8 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | 1827e10 | 2010-08-16 16:18:59 +0000 | [diff] [blame] | 23 | // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:8 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | 590c7d5 | 2010-07-08 20:55:51 +0000 | [diff] [blame] | 24 | // CHECK-CC2: macro definition:{TypedText nil} (30) |
| 25 | // RUN: c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC3 %s |
Douglas Gregor | 1827e10 | 2010-08-16 16:18:59 +0000 | [diff] [blame] | 26 | // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC3 %s |
Douglas Gregor | 590c7d5 | 2010-07-08 20:55:51 +0000 | [diff] [blame] | 27 | // CHECK-CC3: macro definition:{TypedText nil} (60) |