8 #define MACRO(x) MACRO2(x)
10 void test(struct Point
*p
) {
15 #define MACRO3(x,y,z) x;y;z
17 void test2(struct Point
*p
) {
23 void test3(struct Point
*p
) {
28 #define VGM2(...) __VA_ARGS__
30 // These need to be last, to test proper handling of EOF.
32 void test3(struct Point
*p
) {
36 void test3(struct Point
*p
) {
41 // RUN: c-index-test -code-completion-at=%s:11:12 %s | FileCheck %s
42 // RUN: c-index-test -code-completion-at=%s:12:12 %s | FileCheck %s
43 // RUN: c-index-test -code-completion-at=%s:18:13 %s | FileCheck %s
44 // RUN: c-index-test -code-completion-at=%s:19:13 %s | FileCheck %s
45 // RUN: c-index-test -code-completion-at=%s:24:9 %s | FileCheck %s
46 // CHECK: FieldDecl:{ResultType float}{TypedText x} (35)
47 // CHECK-NEXT: FieldDecl:{ResultType float}{TypedText y} (35)
48 // CHECK-NEXT: FieldDecl:{ResultType float}{TypedText z} (35)
49 // CHECK-NEXT: Completion contexts:
50 // CHECK-NEXT: Arrow member access
51 // CHECK-NEXT: Container Kind: StructDecl
53 // With these, code-completion is unknown because the macro argument (and the
54 // completion point) is not expanded by the macro definition.
55 // RUN: c-index-test -code-completion-at=%s:33:15 %s -DEOF_TEST1 | FileCheck %s -check-prefix=CHECK-EOF
56 // RUN: c-index-test -code-completion-at=%s:37:20 %s -DEOF_TEST2 | FileCheck %s -check-prefix=CHECK-EOF
57 // CHECK-EOF: Completion contexts: