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 |
| 23 | // CHECK-CC2: macro definition:{TypedText nil} (30) |
| 24 | // RUN: c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC3 %s |
| 25 | // CHECK-CC3: macro definition:{TypedText nil} (60) |