r362316 - Add script to update OpenMP -ast-dump test expectations, and use it to
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 1 21:00:39 PDT 2019
Author: rsmith
Date: Sat Jun 1 21:00:38 2019
New Revision: 362316
URL: http://llvm.org/viewvc/llvm-project?rev=362316&view=rev
Log:
Add script to update OpenMP -ast-dump test expectations, and use it to
regenerate the test expectations.
(Only two tests change, as a result of no longer matching the 0x in a
pointer; the other tests were already excluding that.)
Added:
cfe/trunk/utils/make-ast-dump-check.sh (with props)
Modified:
cfe/trunk/test/AST/ast-dump-openmp-for.c
cfe/trunk/test/AST/ast-dump-openmp-parallel.c
Modified: cfe/trunk/test/AST/ast-dump-openmp-for.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/AST/ast-dump-openmp-for.c?rev=362316&r1=362315&r2=362316&view=diff
==============================================================================
--- cfe/trunk/test/AST/ast-dump-openmp-for.c (original)
+++ cfe/trunk/test/AST/ast-dump-openmp-for.c Sat Jun 1 21:00:38 2019
@@ -35,208 +35,208 @@ void test_five(int x, int y, int z) {
;
}
-// CHECK: TranslationUnitDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK: |-FunctionDecl 0x{{.*}} <{{.*}}ast-dump-openmp-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)'
-// CHECK-NEXT: | |-ParmVarDecl 0x{{.*}} <col:15, col:19> col:19 used x 'int'
-// CHECK-NEXT: | `-CompoundStmt 0x{{.*}} <col:22, line:7:1>
-// CHECK-NEXT: | `-OMPForDirective 0x{{.*}} <line:4:1, col:16>
-// CHECK-NEXT: | `-CapturedStmt 0x{{.*}} <line:5:3, line:6:5>
-// CHECK-NEXT: | |-CapturedDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK-NEXT: | | |-ForStmt 0x{{.*}} <line:5:3, line:6:5>
-// CHECK-NEXT: | | | |-DeclStmt 0x{{.*}} <line:5:8, col:17>
-// CHECK-NEXT: | | | | `-VarDecl 0x{{.*}} <col:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
+// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int'
+// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:22, line:7:1>
+// CHECK-NEXT: | `-OMPForDirective {{.*}} <line:4:1, col:16>
+// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:5:3, line:6:5>
+// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK-NEXT: | | |-ForStmt {{.*}} <line:5:3, line:6:5>
+// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:5:8, col:17>
+// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
// CHECK-NEXT: | | | |-<<<NULL>>>
-// CHECK-NEXT: | | | |-BinaryOperator 0x{{.*}} <col:19, col:23> 'int' '<'
-// CHECK-NEXT: | | | | |-ImplicitCastExpr 0x{{.*}} <col:19> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | | `-DeclRefExpr 0x{{.*}} <col:19> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | | `-ImplicitCastExpr 0x{{.*}} <col:23> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:23> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | | | |-UnaryOperator 0x{{.*}} <col:26, col:27> 'int' postfix '++'
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:26> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-NullStmt 0x{{.*}} <line:6:5> openmp_structured_block
-// CHECK-NEXT: | | |-ImplicitParamDecl 0x{{.*}} <line:4:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:4:1) *const restrict'
-// CHECK-NEXT: | | `-VarDecl 0x{{.*}} <line:5:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
-// CHECK-NEXT: | `-DeclRefExpr 0x{{.*}} <col:3> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: |-FunctionDecl 0x{{.*}} <line:9:1, line:14:1> line:9:6 test_two 'void (int, int)'
-// CHECK-NEXT: | |-ParmVarDecl 0x{{.*}} <col:15, col:19> col:19 used x 'int'
-// CHECK-NEXT: | |-ParmVarDecl 0x{{.*}} <col:22, col:26> col:26 used y 'int'
-// CHECK-NEXT: | `-CompoundStmt 0x{{.*}} <col:29, line:14:1>
-// CHECK-NEXT: | `-OMPForDirective 0x{{.*}} <line:10:1, col:16>
-// CHECK-NEXT: | `-CapturedStmt 0x{{.*}} <line:11:3, line:13:7>
-// CHECK-NEXT: | |-CapturedDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK-NEXT: | | |-ForStmt 0x{{.*}} <line:11:3, line:13:7>
-// CHECK-NEXT: | | | |-DeclStmt 0x{{.*}} <line:11:8, col:17>
-// CHECK-NEXT: | | | | `-VarDecl 0x{{.*}} <col:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
+// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:6:5> openmp_structured_block
+// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:4:1) *const restrict'
+// CHECK-NEXT: | | `-VarDecl {{.*}} <line:5:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: |-FunctionDecl {{.*}} <line:9:1, line:14:1> line:9:6 test_two 'void (int, int)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:22, col:26> col:26 used y 'int'
+// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:29, line:14:1>
+// CHECK-NEXT: | `-OMPForDirective {{.*}} <line:10:1, col:16>
+// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:11:3, line:13:7>
+// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK-NEXT: | | |-ForStmt {{.*}} <line:11:3, line:13:7>
+// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:11:8, col:17>
+// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
// CHECK-NEXT: | | | |-<<<NULL>>>
-// CHECK-NEXT: | | | |-BinaryOperator 0x{{.*}} <col:19, col:23> 'int' '<'
-// CHECK-NEXT: | | | | |-ImplicitCastExpr 0x{{.*}} <col:19> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | | `-DeclRefExpr 0x{{.*}} <col:19> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | | `-ImplicitCastExpr 0x{{.*}} <col:23> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:23> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | | | |-UnaryOperator 0x{{.*}} <col:26, col:27> 'int' postfix '++'
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:26> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-ForStmt 0x{{.*}} <line:12:5, line:13:7> openmp_structured_block
-// CHECK-NEXT: | | | |-DeclStmt 0x{{.*}} <line:12:10, col:19>
-// CHECK-NEXT: | | | | `-VarDecl 0x{{.*}} <col:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
+// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:12:5, line:13:7> openmp_structured_block
+// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:12:10, col:19>
+// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
// CHECK-NEXT: | | | |-<<<NULL>>>
-// CHECK-NEXT: | | | |-BinaryOperator 0x{{.*}} <col:21, col:25> 'int' '<'
-// CHECK-NEXT: | | | | |-ImplicitCastExpr 0x{{.*}} <col:21> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | | `-DeclRefExpr 0x{{.*}} <col:21> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | | `-ImplicitCastExpr 0x{{.*}} <col:25> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:25> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: | | | |-UnaryOperator 0x{{.*}} <col:28, col:29> 'int' postfix '++'
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:28> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-NullStmt 0x{{.*}} <line:13:7>
-// CHECK-NEXT: | | |-ImplicitParamDecl 0x{{.*}} <line:10:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:10:1) *const restrict'
-// CHECK-NEXT: | | |-VarDecl 0x{{.*}} <line:11:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
-// CHECK-NEXT: | | `-VarDecl 0x{{.*}} <line:12:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
-// CHECK-NEXT: | |-DeclRefExpr 0x{{.*}} <line:11:3> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | `-DeclRefExpr 0x{{.*}} <line:12:25> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: |-FunctionDecl 0x{{.*}} <line:16:1, line:21:1> line:16:6 test_three 'void (int, int)'
-// CHECK-NEXT: | |-ParmVarDecl 0x{{.*}} <col:17, col:21> col:21 used x 'int'
-// CHECK-NEXT: | |-ParmVarDecl 0x{{.*}} <col:24, col:28> col:28 used y 'int'
-// CHECK-NEXT: | `-CompoundStmt 0x{{.*}} <col:31, line:21:1>
-// CHECK-NEXT: | `-OMPForDirective 0x{{.*}} <line:17:1, col:28>
-// CHECK-NEXT: | |-OMPCollapseClause 0x{{.*}} <col:17, col:27>
-// CHECK-NEXT: | | `-ConstantExpr 0x{{.*}} <col:26> 'int'
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:26> 'int' 1
-// CHECK-NEXT: | `-CapturedStmt 0x{{.*}} <line:18:3, line:20:7>
-// CHECK-NEXT: | |-CapturedDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK-NEXT: | | |-ForStmt 0x{{.*}} <line:18:3, line:20:7>
-// CHECK-NEXT: | | | |-DeclStmt 0x{{.*}} <line:18:8, col:17>
-// CHECK-NEXT: | | | | `-VarDecl 0x{{.*}} <col:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
+// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:13:7>
+// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:10:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:10:1) *const restrict'
+// CHECK-NEXT: | | |-VarDecl {{.*}} <line:11:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | | `-VarDecl {{.*}} <line:12:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:11:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:12:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: |-FunctionDecl {{.*}} <line:16:1, line:21:1> line:16:6 test_three 'void (int, int)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:17, col:21> col:21 used x 'int'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:24, col:28> col:28 used y 'int'
+// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:31, line:21:1>
+// CHECK-NEXT: | `-OMPForDirective {{.*}} <line:17:1, col:28>
+// CHECK-NEXT: | |-OMPCollapseClause {{.*}} <col:17, col:27>
+// CHECK-NEXT: | | `-ConstantExpr {{.*}} <col:26> 'int'
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:26> 'int' 1
+// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:18:3, line:20:7>
+// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK-NEXT: | | |-ForStmt {{.*}} <line:18:3, line:20:7>
+// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:18:8, col:17>
+// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
// CHECK-NEXT: | | | |-<<<NULL>>>
-// CHECK-NEXT: | | | |-BinaryOperator 0x{{.*}} <col:19, col:23> 'int' '<'
-// CHECK-NEXT: | | | | |-ImplicitCastExpr 0x{{.*}} <col:19> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | | `-DeclRefExpr 0x{{.*}} <col:19> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | | `-ImplicitCastExpr 0x{{.*}} <col:23> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:23> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | | | |-UnaryOperator 0x{{.*}} <col:26, col:27> 'int' postfix '++'
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:26> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-ForStmt 0x{{.*}} <line:19:5, line:20:7> openmp_structured_block
-// CHECK-NEXT: | | | |-DeclStmt 0x{{.*}} <line:19:10, col:19>
-// CHECK-NEXT: | | | | `-VarDecl 0x{{.*}} <col:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
+// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:19:5, line:20:7> openmp_structured_block
+// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:19:10, col:19>
+// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
// CHECK-NEXT: | | | |-<<<NULL>>>
-// CHECK-NEXT: | | | |-BinaryOperator 0x{{.*}} <col:21, col:25> 'int' '<'
-// CHECK-NEXT: | | | | |-ImplicitCastExpr 0x{{.*}} <col:21> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | | `-DeclRefExpr 0x{{.*}} <col:21> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | | `-ImplicitCastExpr 0x{{.*}} <col:25> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:25> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: | | | |-UnaryOperator 0x{{.*}} <col:28, col:29> 'int' postfix '++'
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:28> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-NullStmt 0x{{.*}} <line:20:7>
-// CHECK-NEXT: | | |-ImplicitParamDecl 0x{{.*}} <line:17:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:17:1) *const restrict'
-// CHECK-NEXT: | | |-VarDecl 0x{{.*}} <line:18:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
-// CHECK-NEXT: | | `-VarDecl 0x{{.*}} <line:19:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
-// CHECK-NEXT: | |-DeclRefExpr 0x{{.*}} <line:18:3> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | `-DeclRefExpr 0x{{.*}} <line:19:25> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: |-FunctionDecl 0x{{.*}} <line:23:1, line:28:1> line:23:6 test_four 'void (int, int)'
-// CHECK-NEXT: | |-ParmVarDecl 0x{{.*}} <col:16, col:20> col:20 used x 'int'
-// CHECK-NEXT: | |-ParmVarDecl 0x{{.*}} <col:23, col:27> col:27 used y 'int'
-// CHECK-NEXT: | `-CompoundStmt 0x{{.*}} <col:30, line:28:1>
-// CHECK-NEXT: | `-OMPForDirective 0x{{.*}} <line:24:1, col:28>
-// CHECK-NEXT: | |-OMPCollapseClause 0x{{.*}} <col:17, col:27>
-// CHECK-NEXT: | | `-ConstantExpr 0x{{.*}} <col:26> 'int'
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:26> 'int' 2
-// CHECK-NEXT: | `-CapturedStmt 0x{{.*}} <line:25:3, line:27:7>
-// CHECK-NEXT: | |-CapturedDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK-NEXT: | | |-ForStmt 0x{{.*}} <line:25:3, line:27:7>
-// CHECK-NEXT: | | | |-DeclStmt 0x{{.*}} <line:25:8, col:17>
-// CHECK-NEXT: | | | | `-VarDecl 0x{{.*}} <col:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
+// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:20:7>
+// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:17:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:17:1) *const restrict'
+// CHECK-NEXT: | | |-VarDecl {{.*}} <line:18:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | | `-VarDecl {{.*}} <line:19:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:18:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:19:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: |-FunctionDecl {{.*}} <line:23:1, line:28:1> line:23:6 test_four 'void (int, int)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int'
+// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:28:1>
+// CHECK-NEXT: | `-OMPForDirective {{.*}} <line:24:1, col:28>
+// CHECK-NEXT: | |-OMPCollapseClause {{.*}} <col:17, col:27>
+// CHECK-NEXT: | | `-ConstantExpr {{.*}} <col:26> 'int'
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:26> 'int' 2
+// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:25:3, line:27:7>
+// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK-NEXT: | | |-ForStmt {{.*}} <line:25:3, line:27:7>
+// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:25:8, col:17>
+// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
// CHECK-NEXT: | | | |-<<<NULL>>>
-// CHECK-NEXT: | | | |-BinaryOperator 0x{{.*}} <col:19, col:23> 'int' '<'
-// CHECK-NEXT: | | | | |-ImplicitCastExpr 0x{{.*}} <col:19> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | | `-DeclRefExpr 0x{{.*}} <col:19> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | | `-ImplicitCastExpr 0x{{.*}} <col:23> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:23> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | | | |-UnaryOperator 0x{{.*}} <col:26, col:27> 'int' postfix '++'
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:26> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-ForStmt 0x{{.*}} <line:26:5, line:27:7>
-// CHECK-NEXT: | | | |-DeclStmt 0x{{.*}} <line:26:10, col:19>
-// CHECK-NEXT: | | | | `-VarDecl 0x{{.*}} <col:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
+// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:26:5, line:27:7>
+// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:26:10, col:19>
+// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
// CHECK-NEXT: | | | |-<<<NULL>>>
-// CHECK-NEXT: | | | |-BinaryOperator 0x{{.*}} <col:21, col:25> 'int' '<'
-// CHECK-NEXT: | | | | |-ImplicitCastExpr 0x{{.*}} <col:21> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | | `-DeclRefExpr 0x{{.*}} <col:21> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | | `-ImplicitCastExpr 0x{{.*}} <col:25> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:25> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: | | | |-UnaryOperator 0x{{.*}} <col:28, col:29> 'int' postfix '++'
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:28> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-NullStmt 0x{{.*}} <line:27:7> openmp_structured_block
-// CHECK-NEXT: | | |-ImplicitParamDecl 0x{{.*}} <line:24:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:24:1) *const restrict'
-// CHECK-NEXT: | | |-VarDecl 0x{{.*}} <line:25:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
-// CHECK-NEXT: | | `-VarDecl 0x{{.*}} <line:26:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
-// CHECK-NEXT: | |-DeclRefExpr 0x{{.*}} <line:25:3> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | `-DeclRefExpr 0x{{.*}} <line:26:5> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: `-FunctionDecl 0x{{.*}} <line:30:1, line:36:1> line:30:6 test_five 'void (int, int, int)'
-// CHECK-NEXT: |-ParmVarDecl 0x{{.*}} <col:16, col:20> col:20 used x 'int'
-// CHECK-NEXT: |-ParmVarDecl 0x{{.*}} <col:23, col:27> col:27 used y 'int'
-// CHECK-NEXT: |-ParmVarDecl 0x{{.*}} <col:30, col:34> col:34 used z 'int'
-// CHECK-NEXT: `-CompoundStmt 0x{{.*}} <col:37, line:36:1>
-// CHECK-NEXT: `-OMPForDirective 0x{{.*}} <line:31:1, col:28>
-// CHECK-NEXT: |-OMPCollapseClause 0x{{.*}} <col:17, col:27>
-// CHECK-NEXT: | `-ConstantExpr 0x{{.*}} <col:26> 'int'
-// CHECK-NEXT: | `-IntegerLiteral 0x{{.*}} <col:26> 'int' 2
-// CHECK-NEXT: `-CapturedStmt 0x{{.*}} <line:32:3, line:35:9>
-// CHECK-NEXT: |-CapturedDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK-NEXT: | |-ForStmt 0x{{.*}} <line:32:3, line:35:9>
-// CHECK-NEXT: | | |-DeclStmt 0x{{.*}} <line:32:8, col:17>
-// CHECK-NEXT: | | | `-VarDecl 0x{{.*}} <col:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
+// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:27:7> openmp_structured_block
+// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:24:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:24:1) *const restrict'
+// CHECK-NEXT: | | |-VarDecl {{.*}} <line:25:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | | `-VarDecl {{.*}} <line:26:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:25:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:26:5> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: `-FunctionDecl {{.*}} <line:30:1, line:36:1> line:30:6 test_five 'void (int, int, int)'
+// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int'
+// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int'
+// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:30, col:34> col:34 used z 'int'
+// CHECK-NEXT: `-CompoundStmt {{.*}} <col:37, line:36:1>
+// CHECK-NEXT: `-OMPForDirective {{.*}} <line:31:1, col:28>
+// CHECK-NEXT: |-OMPCollapseClause {{.*}} <col:17, col:27>
+// CHECK-NEXT: | `-ConstantExpr {{.*}} <col:26> 'int'
+// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:26> 'int' 2
+// CHECK-NEXT: `-CapturedStmt {{.*}} <line:32:3, line:35:9>
+// CHECK-NEXT: |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK-NEXT: | |-ForStmt {{.*}} <line:32:3, line:35:9>
+// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:32:8, col:17>
+// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
// CHECK-NEXT: | | |-<<<NULL>>>
-// CHECK-NEXT: | | |-BinaryOperator 0x{{.*}} <col:19, col:23> 'int' '<'
-// CHECK-NEXT: | | | |-ImplicitCastExpr 0x{{.*}} <col:19> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:19> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-ImplicitCastExpr 0x{{.*}} <col:23> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | `-DeclRefExpr 0x{{.*}} <col:23> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: | | |-UnaryOperator 0x{{.*}} <col:26, col:27> 'int' postfix '++'
-// CHECK-NEXT: | | | `-DeclRefExpr 0x{{.*}} <col:26> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | `-ForStmt 0x{{.*}} <line:33:5, line:35:9>
-// CHECK-NEXT: | | |-DeclStmt 0x{{.*}} <line:33:10, col:19>
-// CHECK-NEXT: | | | `-VarDecl 0x{{.*}} <col:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
+// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
+// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | `-ForStmt {{.*}} <line:33:5, line:35:9>
+// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:33:10, col:19>
+// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
// CHECK-NEXT: | | |-<<<NULL>>>
-// CHECK-NEXT: | | |-BinaryOperator 0x{{.*}} <col:21, col:25> 'int' '<'
-// CHECK-NEXT: | | | |-ImplicitCastExpr 0x{{.*}} <col:21> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:21> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-ImplicitCastExpr 0x{{.*}} <col:25> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | `-DeclRefExpr 0x{{.*}} <col:25> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: | | |-UnaryOperator 0x{{.*}} <col:28, col:29> 'int' postfix '++'
-// CHECK-NEXT: | | | `-DeclRefExpr 0x{{.*}} <col:28> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | `-ForStmt 0x{{.*}} <line:34:7, line:35:9> openmp_structured_block
-// CHECK-NEXT: | | |-DeclStmt 0x{{.*}} <line:34:12, col:21>
-// CHECK-NEXT: | | | `-VarDecl 0x{{.*}} <col:12, col:20> col:16 used i 'int' cinit
-// CHECK-NEXT: | | | `-IntegerLiteral 0x{{.*}} <col:20> 'int' 0
+// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
+// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
+// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | `-ForStmt {{.*}} <line:34:7, line:35:9> openmp_structured_block
+// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:34:12, col:21>
+// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit
+// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0
// CHECK-NEXT: | | |-<<<NULL>>>
-// CHECK-NEXT: | | |-BinaryOperator 0x{{.*}} <col:23, col:27> 'int' '<'
-// CHECK-NEXT: | | | |-ImplicitCastExpr 0x{{.*}} <col:23> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | | `-DeclRefExpr 0x{{.*}} <col:23> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | | `-ImplicitCastExpr 0x{{.*}} <col:27> 'int' <LValueToRValue>
-// CHECK-NEXT: | | | `-DeclRefExpr 0x{{.*}} <col:27> 'int' lvalue ParmVar 0x{{.*}} 'z' 'int'
-// CHECK-NEXT: | | |-UnaryOperator 0x{{.*}} <col:30, col:31> 'int' postfix '++'
-// CHECK-NEXT: | | | `-DeclRefExpr 0x{{.*}} <col:30> 'int' lvalue Var 0x{{.*}} 'i' 'int'
-// CHECK-NEXT: | | `-NullStmt 0x{{.*}} <line:35:9>
-// CHECK-NEXT: | |-ImplicitParamDecl 0x{{.*}} <line:31:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:31:1) *const restrict'
-// CHECK-NEXT: | |-VarDecl 0x{{.*}} <line:32:8, col:16> col:12 used i 'int' cinit
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:16> 'int' 0
-// CHECK-NEXT: | |-VarDecl 0x{{.*}} <line:33:10, col:18> col:14 used i 'int' cinit
-// CHECK-NEXT: | | `-IntegerLiteral 0x{{.*}} <col:18> 'int' 0
-// CHECK-NEXT: | `-VarDecl 0x{{.*}} <line:34:12, col:20> col:16 used i 'int' cinit
-// CHECK-NEXT: | `-IntegerLiteral 0x{{.*}} <col:20> 'int' 0
-// CHECK-NEXT: |-DeclRefExpr 0x{{.*}} <line:32:3> 'int' lvalue ParmVar 0x{{.*}} 'x' 'int'
-// CHECK-NEXT: |-DeclRefExpr 0x{{.*}} <line:33:5> 'int' lvalue ParmVar 0x{{.*}} 'y' 'int'
-// CHECK-NEXT: `-DeclRefExpr 0x{{.*}} <line:34:27> 'int' lvalue ParmVar 0x{{.*}} 'z' 'int'
+// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<'
+// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue>
+// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int'
+// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++'
+// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int'
+// CHECK-NEXT: | | `-NullStmt {{.*}} <line:35:9>
+// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:31:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-for.c:31:1) *const restrict'
+// CHECK-NEXT: | |-VarDecl {{.*}} <line:32:8, col:16> col:12 used i 'int' cinit
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
+// CHECK-NEXT: | |-VarDecl {{.*}} <line:33:10, col:18> col:14 used i 'int' cinit
+// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
+// CHECK-NEXT: | `-VarDecl {{.*}} <line:34:12, col:20> col:16 used i 'int' cinit
+// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:20> 'int' 0
+// CHECK-NEXT: |-DeclRefExpr {{.*}} <line:32:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
+// CHECK-NEXT: |-DeclRefExpr {{.*}} <line:33:5> 'int' lvalue ParmVar {{.*}} 'y' 'int'
+// CHECK-NEXT: `-DeclRefExpr {{.*}} <line:34:27> 'int' lvalue ParmVar {{.*}} 'z' 'int'
Modified: cfe/trunk/test/AST/ast-dump-openmp-parallel.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/AST/ast-dump-openmp-parallel.c?rev=362316&r1=362315&r2=362316&view=diff
==============================================================================
--- cfe/trunk/test/AST/ast-dump-openmp-parallel.c (original)
+++ cfe/trunk/test/AST/ast-dump-openmp-parallel.c Sat Jun 1 21:00:38 2019
@@ -5,13 +5,13 @@ void test() {
;
}
-// CHECK: TranslationUnitDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK: `-FunctionDecl 0x{{.*}} <{{.*}}ast-dump-openmp-parallel.c:3:1, line:6:1> line:3:6 test 'void ()'
-// CHECK-NEXT: `-CompoundStmt 0x{{.*}} <col:13, line:6:1>
-// CHECK-NEXT: `-OMPParallelDirective 0x{{.*}} <line:4:1, col:21>
-// CHECK-NEXT: `-CapturedStmt 0x{{.*}} <line:5:3>
-// CHECK-NEXT: `-CapturedDecl 0x{{.*}} <<invalid sloc>> <invalid sloc> nothrow
-// CHECK-NEXT: |-NullStmt 0x{{.*}} <col:3> openmp_structured_block
-// CHECK-NEXT: |-ImplicitParamDecl 0x{{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
-// CHECK-NEXT: |-ImplicitParamDecl 0x{{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
-// CHECK-NEXT: `-ImplicitParamDecl 0x{{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-parallel.c:4:1) *const restrict'
+// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel.c:3:1, line:6:1> line:3:6 test 'void ()'
+// CHECK-NEXT: `-CompoundStmt {{.*}} <col:13, line:6:1>
+// CHECK-NEXT: `-OMPParallelDirective {{.*}} <line:4:1, col:21>
+// CHECK-NEXT: `-CapturedStmt {{.*}} <line:5:3>
+// CHECK-NEXT: `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
+// CHECK-NEXT: |-NullStmt {{.*}} <col:3> openmp_structured_block
+// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
+// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
+// CHECK-NEXT: `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-parallel.c:4:1) *const restrict'
Added: cfe/trunk/utils/make-ast-dump-check.sh
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/make-ast-dump-check.sh?rev=362316&view=auto
==============================================================================
--- cfe/trunk/utils/make-ast-dump-check.sh (added)
+++ cfe/trunk/utils/make-ast-dump-check.sh Sat Jun 1 21:00:38 2019
@@ -0,0 +1,79 @@
+#! /bin/bash
+
+# This script is intended as a FileCheck replacement to update the test
+# expectations in a -ast-dump test.
+#
+# Usage:
+#
+# $ lit -DFileCheck=$PWD/utils/make-ast-dump-check.sh test/AST/ast-dump-openmp-*
+
+prefix=CHECK
+
+while [[ "$#" -ne 0 ]]; do
+ case "$1" in
+ --check-prefix)
+ shift
+ prefix="$1"
+ ;;
+ --implicit-check-not)
+ shift
+ ;;
+ -*)
+ ;;
+ *)
+ file="$1"
+ ;;
+ esac
+ shift
+done
+
+testdir="$(dirname "$file")"
+
+read -r -d '' script <<REWRITE
+BEGIN {
+ skipping_builtins = 0
+ matched_last_line = 0
+}
+
+/^[\`|].* line:/ {
+ skipping_builtins = 0
+}
+
+{
+ if (skipping_builtins == 1) {
+ matched_last_line = 0
+ next
+ }
+}
+
+/TranslationUnitDecl/ {
+ skipping_builtins = 1
+}
+
+{
+ s = \$0
+ gsub("0x[0-9a-fA-F]+", "{{.*}}", s)
+ gsub("$testdir/", "{{.*}}", s)
+}
+
+matched_last_line == 0 {
+ print "// ${prefix}: " s
+}
+
+matched_last_line == 1 {
+ print "// ${prefix}-NEXT: " s
+}
+
+{
+ matched_last_line = 1
+}
+REWRITE
+
+echo "$script"
+
+{
+ cat "$file" | grep -v "$prefix"
+ awk "$script"
+} > "$file.new"
+
+mv "$file.new" "$file"
Propchange: cfe/trunk/utils/make-ast-dump-check.sh
------------------------------------------------------------------------------
svn:executable = *
More information about the cfe-commits
mailing list