1*f4a2713aSLionel Sambuc // Note: the run lines follow their respective tests, since line/column
2*f4a2713aSLionel Sambuc // matter in this test.
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc typedef int Integer;
f(int x)5*f4a2713aSLionel Sambuc void f(int x) {
6*f4a2713aSLionel Sambuc if (x) {
7*f4a2713aSLionel Sambuc }
8*f4a2713aSLionel Sambuc }
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:7:4 %s | FileCheck -check-prefix=CHECK-IF-ELSE %s
11*f4a2713aSLionel Sambuc // CHECK-IF-ELSE: NotImplemented:{TypedText else}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Placeholder statements}{VerticalSpace }{RightBrace }} (40)
12*f4a2713aSLionel Sambuc // CHECK-IF-ELSE: NotImplemented:{TypedText else}{HorizontalSpace }{Text if}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Placeholder statements}{VerticalSpace }{RightBrace }} (40)
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc // RUN: c-index-test -code-completion-at=%s:7:4 %s | FileCheck -check-prefix=CHECK-IF-ELSE-SIMPLE %s
15*f4a2713aSLionel Sambuc // CHECK-IF-ELSE-SIMPLE: NotImplemented:{TypedText else} (40)
16*f4a2713aSLionel Sambuc // CHECK-IF-ELSE-SIMPLE: NotImplemented:{TypedText else}{HorizontalSpace }{Text if}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )} (40)
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambuc // RUN: c-index-test -code-completion-at=%s:6:1 %s | FileCheck -check-prefix=CHECK-STMT %s
19*f4a2713aSLionel Sambuc // CHECK-STMT: NotImplemented:{TypedText char} (50)
20*f4a2713aSLionel Sambuc // CHECK-STMT: NotImplemented:{TypedText const} (50)
21*f4a2713aSLionel Sambuc // CHECK-STMT: NotImplemented:{TypedText double} (50)
22*f4a2713aSLionel Sambuc // CHECK-STMT: NotImplemented:{TypedText enum} (50)
23*f4a2713aSLionel Sambuc // CHECK-STMT: FunctionDecl:{ResultType void}{TypedText f}{LeftParen (}{Placeholder int x}{RightParen )} (50)
24*f4a2713aSLionel Sambuc // CHECK-STMT: TypedefDecl:{TypedText Integer} (50)
25*f4a2713aSLionel Sambuc // CHECK-STMT: ParmDecl:{ResultType int}{TypedText x} (34)
26