2012-11-07 04:33:12 +04:00
|
|
|
// RUN: %clang_cc1 -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s
|
|
|
|
|
|
|
|
int TestLocation = 0;
|
2012-12-20 06:09:13 +04:00
|
|
|
// CHECK: VarDecl{{.*}}TestLocation
|
|
|
|
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:20> 'int' 0
|
2012-11-07 04:33:12 +04:00
|
|
|
|
|
|
|
int TestIndent = 1 + (1);
|
2012-12-20 06:09:13 +04:00
|
|
|
// CHECK: VarDecl{{.*}}TestIndent
|
|
|
|
// CHECK-NEXT: {{^ \(BinaryOperator[^()]*$}}
|
|
|
|
// CHECK-NEXT: {{^ \(IntegerLiteral.*0[^()]*\)$}}
|
|
|
|
// CHECK-NEXT: {{^ \(ParenExpr.*0[^()]*$}}
|
|
|
|
// CHECK-NEXT: {{^ \(IntegerLiteral.*0[^()]*\)\)\)\)$}}
|
2012-11-07 04:33:12 +04:00
|
|
|
|
|
|
|
void TestDeclStmt() {
|
|
|
|
int x = 0;
|
|
|
|
int y, z;
|
|
|
|
}
|
2012-12-20 06:09:13 +04:00
|
|
|
// CHECK: FunctionDecl{{.*}}TestDeclStmt
|
2012-11-07 04:33:12 +04:00
|
|
|
// CHECK-NEXT: CompoundStmt
|
|
|
|
// CHECK-NEXT: DeclStmt
|
2012-12-20 06:09:13 +04:00
|
|
|
// CHECK-NEXT: VarDecl{{.*}}x
|
2012-11-07 04:33:12 +04:00
|
|
|
// CHECK-NEXT: IntegerLiteral
|
|
|
|
// CHECK-NEXT: DeclStmt
|
2012-12-20 06:09:13 +04:00
|
|
|
// CHECK-NEXT: VarDecl{{.*}}y
|
|
|
|
// CHECK-NEXT: VarDecl{{.*}}z
|
2012-11-07 04:33:12 +04:00
|
|
|
|
|
|
|
int TestOpaqueValueExpr = 0 ?: 1;
|
2012-12-20 06:09:13 +04:00
|
|
|
// CHECK: VarDecl{{.*}}TestOpaqueValueExpr
|
2012-11-07 04:33:12 +04:00
|
|
|
// CHECK-NEXT: BinaryConditionalOperator
|
|
|
|
// CHECK-NEXT: IntegerLiteral
|
|
|
|
// CHECK-NEXT: OpaqueValueExpr
|
|
|
|
// CHECK-NEXT: IntegerLiteral
|
|
|
|
// CHECK-NEXT: OpaqueValueExpr
|
|
|
|
// CHECK-NEXT: IntegerLiteral
|
|
|
|
// CHECK-NEXT: IntegerLiteral
|