1*f4a2713aSLionel Sambuc// The line and column layout of this test is significant. Run lines 2*f4a2713aSLionel Sambuc// are at the end. 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc#if 1 5*f4a2713aSLionel Sambuc#endif 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc#define FOO(a, b) a##b 8*f4a2713aSLionel Sambuc#define BAR 9*f4a2713aSLionel Sambuc#ifdef FOO 10*f4a2713aSLionel Sambuc#endif 11*f4a2713aSLionel Sambuc#if defined(FOO) 12*f4a2713aSLionel Sambuc#endif 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel SambucFOO(in,t) value; 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:4:2 %s | FileCheck -check-prefix=CHECK-CC1 %s 17*f4a2713aSLionel Sambuc// CHECK-CC1: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro} (40) 18*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro}{LeftParen (}{Placeholder args}{RightParen )} (40) 19*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText error}{HorizontalSpace }{Placeholder message} (40) 20*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText if}{HorizontalSpace }{Placeholder condition} (40) 21*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText ifdef}{HorizontalSpace }{Placeholder macro} (40) 22*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText ifndef}{HorizontalSpace }{Placeholder macro} (40) 23*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40) 24*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40) 25*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40) 26*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40) 27*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40) 28*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40) 29*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number} (40) 30*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number}{HorizontalSpace }{Text "}{Placeholder filename}{Text "} (40) 31*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText pragma}{HorizontalSpace }{Placeholder arguments} (40) 32*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText undef}{HorizontalSpace }{Placeholder macro} (40) 33*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: NotImplemented:{TypedText warning}{HorizontalSpace }{Placeholder message} (40) 34*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:5:2 %s | FileCheck -check-prefix=CHECK-CC2 %s 35*f4a2713aSLionel Sambuc// CHECK-CC2: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro} (40) 36*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro}{LeftParen (}{Placeholder args}{RightParen )} (40) 37*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText elif}{HorizontalSpace }{Placeholder condition} (40) 38*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText else} (40) 39*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText endif} (40) 40*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText error}{HorizontalSpace }{Placeholder message} (40) 41*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText if}{HorizontalSpace }{Placeholder condition} (40) 42*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText ifdef}{HorizontalSpace }{Placeholder macro} (40) 43*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText ifndef}{HorizontalSpace }{Placeholder macro} (40) 44*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40) 45*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40) 46*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40) 47*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40) 48*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40) 49*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40) 50*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number} (40) 51*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number}{HorizontalSpace }{Text "}{Placeholder filename}{Text "} (40) 52*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText pragma}{HorizontalSpace }{Placeholder arguments} (40) 53*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText undef}{HorizontalSpace }{Placeholder macro} (40) 54*f4a2713aSLionel Sambuc// CHECK-CC2-NEXT: NotImplemented:{TypedText warning}{HorizontalSpace }{Placeholder message} (40) 55*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:9:8 %s | FileCheck -check-prefix=CHECK-CC3 %s 56*f4a2713aSLionel Sambuc// CHECK-CC3: macro definition:{TypedText BAR} (40) 57*f4a2713aSLionel Sambuc// CHECK-CC3: macro definition:{TypedText FOO} (40) 58*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:11:12 %s | FileCheck -check-prefix=CHECK-CC3 %s 59*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:11:13 %s | FileCheck -check-prefix=CHECK-CC3 %s 60*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:11:5 %s | FileCheck -check-prefix=CHECK-CC4 %s 61*f4a2713aSLionel Sambuc// CHECK-CC4: macro definition:{TypedText BAR} (70) 62*f4a2713aSLionel Sambuc// CHECK-CC4: macro definition:{TypedText FOO}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (70) 63*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:14:5 %s | FileCheck -check-prefix=CHECK-CC5 %s 64*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText const} (50) 65*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText double} (50) 66*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText enum} (50) 67*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText extern} (40) 68*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText float} (50) 69*f4a2713aSLionel Sambuc// CHECK-CC5: macro definition:{TypedText FOO}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (70) 70*f4a2713aSLionel Sambuc// CHECK-CC5: TypedefDecl:{TypedText id} (50) 71*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText inline} (40) 72*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText int} (50) 73*f4a2713aSLionel Sambuc// CHECK-CC5: NotImplemented:{TypedText long} (50) 74*f4a2713aSLionel Sambuc 75*f4a2713aSLionel Sambuc// Same tests as above, but with completion caching. 76*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:4:2 %s | FileCheck -check-prefix=CHECK-CC1 %s 77*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:5:2 %s | FileCheck -check-prefix=CHECK-CC2 %s 78*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:9:8 %s | FileCheck -check-prefix=CHECK-CC3 %s 79*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:11:5 %s | FileCheck -check-prefix=CHECK-CC4 %s 80*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:5 %s | FileCheck -check-prefix=CHECK-CC5 %s 81