1 // RUN: %clang_cc1 -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s
2
3 int TestLocation = 0;
4 // CHECK: VarDecl{{.*}}TestLocation
5 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:20> 'int' 0
6
7 int TestIndent = 1 + (1);
8 // CHECK: VarDecl{{.*}}TestIndent
9 // CHECK-NEXT: {{^}}`-BinaryOperator{{[^()]*$}}
10 // CHECK-NEXT: {{^}} |-IntegerLiteral{{.*0[^()]*$}}
11 // CHECK-NEXT: {{^}} `-ParenExpr{{.*0[^()]*$}}
12 // CHECK-NEXT: {{^}} `-IntegerLiteral{{.*0[^()]*$}}
13
TestDeclStmt()14 void TestDeclStmt() {
15 int x = 0;
16 int y, z;
17 }
18 // CHECK: FunctionDecl{{.*}}TestDeclStmt
19 // CHECK-NEXT: CompoundStmt
20 // CHECK-NEXT: DeclStmt
21 // CHECK-NEXT: VarDecl{{.*}}x
22 // CHECK-NEXT: IntegerLiteral
23 // CHECK-NEXT: DeclStmt
24 // CHECK-NEXT: VarDecl{{.*}}y
25 // CHECK-NEXT: VarDecl{{.*}}z
26
27 int TestOpaqueValueExpr = 0 ?: 1;
28 // CHECK: VarDecl{{.*}}TestOpaqueValueExpr
29 // CHECK-NEXT: BinaryConditionalOperator
30 // CHECK-NEXT: IntegerLiteral
31 // CHECK-NEXT: OpaqueValueExpr
32 // CHECK-NEXT: IntegerLiteral
33 // CHECK-NEXT: OpaqueValueExpr
34 // CHECK-NEXT: IntegerLiteral
35 // CHECK-NEXT: IntegerLiteral
36