From 059a335ee99e9c50442d8caa35c1b31b5cf47e9c Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 11 Feb 2021 10:12:38 -0500 Subject: [PATCH] Store the calculated constant expression value into the ConstantExpr object With https://reviews.llvm.org/D63376, we began storing the APValue directly into the ConstantExpr object so that we could reuse the calculated value later. However, it missed a case when not in C++11 mode but the expression is known to be constant. --- clang/lib/Sema/SemaExpr.cpp | 3 ++- clang/test/AST/ast-dump-c-attr.c | 5 +++-- clang/test/AST/ast-dump-decl-json.c | 2 ++ clang/test/AST/ast-dump-decl.c | 6 ++++-- .../AST/ast-dump-openmp-distribute-parallel-for-simd.c | 3 +++ .../test/AST/ast-dump-openmp-distribute-parallel-for.c | 3 +++ clang/test/AST/ast-dump-openmp-distribute-simd.c | 3 +++ clang/test/AST/ast-dump-openmp-distribute.c | 3 +++ clang/test/AST/ast-dump-openmp-for-simd.c | 3 +++ clang/test/AST/ast-dump-openmp-for.c | 3 +++ clang/test/AST/ast-dump-openmp-ordered.c | 1 + clang/test/AST/ast-dump-openmp-parallel-for-simd.c | 3 +++ clang/test/AST/ast-dump-openmp-parallel-for.c | 3 +++ clang/test/AST/ast-dump-openmp-simd.c | 3 +++ .../AST/ast-dump-openmp-target-parallel-for-simd.c | 3 +++ clang/test/AST/ast-dump-openmp-target-parallel-for.c | 3 +++ clang/test/AST/ast-dump-openmp-target-simd.c | 3 +++ ...-openmp-target-teams-distribute-parallel-for-simd.c | 3 +++ ...-dump-openmp-target-teams-distribute-parallel-for.c | 3 +++ .../AST/ast-dump-openmp-target-teams-distribute-simd.c | 3 +++ .../test/AST/ast-dump-openmp-target-teams-distribute.c | 3 +++ clang/test/AST/ast-dump-openmp-taskloop-simd.c | 3 +++ clang/test/AST/ast-dump-openmp-taskloop.c | 3 +++ ...st-dump-openmp-teams-distribute-parallel-for-simd.c | 6 ++++++ .../ast-dump-openmp-teams-distribute-parallel-for.c | 6 ++++++ clang/test/AST/ast-dump-openmp-teams-distribute-simd.c | 6 ++++++ clang/test/AST/ast-dump-openmp-teams-distribute.c | 6 ++++++ clang/test/AST/ast-dump-records.c | 10 ++++++++-- 28 files changed, 98 insertions(+), 7 deletions(-) diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 45616dadcbee..1f20ee7f7c7a 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -16138,7 +16138,8 @@ Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, if (Result) *Result = E->EvaluateKnownConstIntCheckOverflow(Context); if (!isa(E)) - E = ConstantExpr::Create(Context, E); + E = Result ? ConstantExpr::Create(Context, E, APValue(*Result)) + : ConstantExpr::Create(Context, E); return E; } diff --git a/clang/test/AST/ast-dump-c-attr.c b/clang/test/AST/ast-dump-c-attr.c index c40a2332090c..7d18f0cdc9f1 100644 --- a/clang/test/AST/ast-dump-c-attr.c +++ b/clang/test/AST/ast-dump-c-attr.c @@ -34,8 +34,9 @@ struct [[deprecated]] Test4 { // CHECK-NEXT: FieldDecl{{.*}}Test6 // CHECK-NEXT: DeprecatedAttr 0x{{[^ ]*}} "Frobble" "" // CHECK-NEXT: FieldDecl{{.*}}Test7 -// CHECK-NEXT: Constant{{.*}}'int' -// CHECK-NEXT: IntegerLiteral{{.*}}'int' 12 +// CHECK-NEXT: ConstantExpr{{.*}}'int' +// CHECK-NEXT: value: Int 12 +// CHECK-NEXT: IntegerLiteral{{.*}}'int' 12 // CHECK-NEXT: DeprecatedAttr 0x{{[^ ]*}} "" "" struct [[deprecated]] Test8; diff --git a/clang/test/AST/ast-dump-decl-json.c b/clang/test/AST/ast-dump-decl-json.c index 8d8f8149666d..5bcd4f1e5e11 100644 --- a/clang/test/AST/ast-dump-decl-json.c +++ b/clang/test/AST/ast-dump-decl-json.c @@ -948,6 +948,7 @@ void testParmVarDecl(int TestParmVarDecl); // CHECK-NEXT: "qualType": "int" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "rvalue", +// CHECK-NEXT: "value": "1", // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", @@ -1668,6 +1669,7 @@ void testParmVarDecl(int TestParmVarDecl); // CHECK-NEXT: "qualType": "int" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "rvalue", +// CHECK-NEXT: "value": "1", // CHECK-NEXT: "inner": [ // CHECK-NEXT: { // CHECK-NEXT: "id": "0x{{.*}}", diff --git a/clang/test/AST/ast-dump-decl.c b/clang/test/AST/ast-dump-decl.c index 0b5a8e93a86d..4380877a410b 100644 --- a/clang/test/AST/ast-dump-decl.c +++ b/clang/test/AST/ast-dump-decl.c @@ -112,7 +112,8 @@ enum testEnumConstantDecl { // CHECK: EnumConstantDecl{{.*}} TestEnumConstantDecl 'int' // CHECK: EnumConstantDecl{{.*}} TestEnumConstantDeclInit 'int' // CHECK-NEXT: ConstantExpr -// CHECK-NEXT: IntegerLiteral +// CHECK-NEXT: value: Int 1 +// CHECK-NEXT: IntegerLiteral struct testIndirectFieldDecl { struct { @@ -160,7 +161,8 @@ struct testFieldDecl { // CHECK: FieldDecl{{.*}} TestFieldDecl 'int' // CHECK: FieldDecl{{.*}} TestFieldDeclWidth 'int' // CHECK-NEXT: ConstantExpr -// CHECK-NEXT: IntegerLiteral +// CHECK-NEXT: value: Int 1 +// CHECK-NEXT: IntegerLiteral // CHECK-MODULE: FieldDecl{{.*}} TestFieldDeclPrivate 'int' __module_private__ int TestVarDecl; diff --git a/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c index fd84cc4ebe43..9090ac43fbb2 100644 --- a/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c @@ -113,6 +113,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -159,6 +160,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -206,6 +208,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c b/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c index e419ff575747..3faf0b5f2fdf 100644 --- a/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c @@ -113,6 +113,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -159,6 +160,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -206,6 +208,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPDistributeParallelForDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-distribute-simd.c b/clang/test/AST/ast-dump-openmp-distribute-simd.c index f9eab635522b..67ace9069ae1 100644 --- a/clang/test/AST/ast-dump-openmp-distribute-simd.c +++ b/clang/test/AST/ast-dump-openmp-distribute-simd.c @@ -105,6 +105,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -147,6 +148,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -190,6 +192,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPDistributeSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-distribute.c b/clang/test/AST/ast-dump-openmp-distribute.c index 1e69ae96880b..e0536ff4fdc2 100644 --- a/clang/test/AST/ast-dump-openmp-distribute.c +++ b/clang/test/AST/ast-dump-openmp-distribute.c @@ -105,6 +105,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -147,6 +148,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPDistributeDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -190,6 +192,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPDistributeDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> diff --git a/clang/test/AST/ast-dump-openmp-for-simd.c b/clang/test/AST/ast-dump-openmp-for-simd.c index 9989f7bfe494..70f947558778 100644 --- a/clang/test/AST/ast-dump-openmp-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-for-simd.c @@ -105,6 +105,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -147,6 +148,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -190,6 +192,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPForSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> diff --git a/clang/test/AST/ast-dump-openmp-for.c b/clang/test/AST/ast-dump-openmp-for.c index e544c175bed9..2762c51bd51e 100644 --- a/clang/test/AST/ast-dump-openmp-for.c +++ b/clang/test/AST/ast-dump-openmp-for.c @@ -105,6 +105,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -147,6 +148,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -190,6 +192,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPForDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> diff --git a/clang/test/AST/ast-dump-openmp-ordered.c b/clang/test/AST/ast-dump-openmp-ordered.c index ec397eb58ee1..67ce6302b2a6 100644 --- a/clang/test/AST/ast-dump-openmp-ordered.c +++ b/clang/test/AST/ast-dump-openmp-ordered.c @@ -57,6 +57,7 @@ void test_three(int x) { // CHECK-NEXT: `-OMPForDirective {{.*}} // CHECK-NEXT: |-OMPOrderedClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 1 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> diff --git a/clang/test/AST/ast-dump-openmp-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-parallel-for-simd.c index 651b87b22883..aa7b6af1ec68 100644 --- a/clang/test/AST/ast-dump-openmp-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-parallel-for-simd.c @@ -109,6 +109,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -153,6 +154,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -198,6 +200,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPParallelForSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-parallel-for.c b/clang/test/AST/ast-dump-openmp-parallel-for.c index f7b6cf80f6f9..34e421a8192b 100644 --- a/clang/test/AST/ast-dump-openmp-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-parallel-for.c @@ -109,6 +109,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -153,6 +154,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> nothrow @@ -198,6 +200,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPParallelForDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-simd.c b/clang/test/AST/ast-dump-openmp-simd.c index 6471725788a8..d977feb54d9b 100644 --- a/clang/test/AST/ast-dump-openmp-simd.c +++ b/clang/test/AST/ast-dump-openmp-simd.c @@ -105,6 +105,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -147,6 +148,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> @@ -190,6 +192,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> diff --git a/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c index d65a729aa402..b68f1ab8676c 100644 --- a/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c @@ -339,6 +339,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -524,6 +525,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -710,6 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTargetParallelForSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-parallel-for.c b/clang/test/AST/ast-dump-openmp-target-parallel-for.c index abfa75ba10df..4ee394fe5b1b 100644 --- a/clang/test/AST/ast-dump-openmp-target-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-target-parallel-for.c @@ -339,6 +339,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -524,6 +525,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -710,6 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTargetParallelForDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-simd.c b/clang/test/AST/ast-dump-openmp-target-simd.c index 404b1b197ab1..60e79b55deaf 100644 --- a/clang/test/AST/ast-dump-openmp-target-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-simd.c @@ -189,6 +189,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -282,6 +283,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -376,6 +378,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTargetSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c index acb3cf37f08c..4269b21393be 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c @@ -671,6 +671,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -1056,6 +1057,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -1442,6 +1444,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTargetTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c index 807d8f138c69..b919c359a2a2 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c @@ -671,6 +671,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -1056,6 +1057,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -1442,6 +1444,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTargetTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c index 83e530c87e3f..1d19e6b8a422 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c @@ -339,6 +339,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -524,6 +525,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -710,6 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTargetTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute.c index a4ebf15356e2..f5e35af0e2b3 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute.c @@ -339,6 +339,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -524,6 +525,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTargetTeamsDistributeDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -710,6 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTargetTeamsDistributeDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-taskloop-simd.c b/clang/test/AST/ast-dump-openmp-taskloop-simd.c index 10f6b98a2154..8734796bf54f 100644 --- a/clang/test/AST/ast-dump-openmp-taskloop-simd.c +++ b/clang/test/AST/ast-dump-openmp-taskloop-simd.c @@ -129,6 +129,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTaskLoopSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -183,6 +184,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTaskLoopSimdDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -238,6 +240,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTaskLoopSimdDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-taskloop.c b/clang/test/AST/ast-dump-openmp-taskloop.c index de1a7eadb72f..08961e3f2401 100644 --- a/clang/test/AST/ast-dump-openmp-taskloop.c +++ b/clang/test/AST/ast-dump-openmp-taskloop.c @@ -129,6 +129,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTaskLoopDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -183,6 +184,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | `-OMPTaskLoopDirective {{.*}} // CHECK-NEXT: | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | |-value: Int 2 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' @@ -238,6 +240,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: `-OMPTaskLoopDirective {{.*}} // CHECK-NEXT: |-OMPCollapseClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | |-value: Int 2 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: |-OMPFirstprivateClause {{.*}} <> // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c index 204b4fe1365e..6ce0b40874dc 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c @@ -742,6 +742,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -950,6 +951,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -1156,6 +1158,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -1383,6 +1386,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 2 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -1610,6 +1614,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | |-OMPTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <> nothrow @@ -1902,6 +1907,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | |-OMPTeamsDistributeParallelForSimdDirective {{.*}} // CHECK-NEXT: | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | |-value: Int 2 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c index 8c86d6c8e376..7fe2b214da4e 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c @@ -742,6 +742,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -950,6 +951,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -1156,6 +1158,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -1383,6 +1386,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 2 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -1610,6 +1614,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | |-OMPTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <> nothrow @@ -1902,6 +1907,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | |-OMPTeamsDistributeParallelForDirective {{.*}} // CHECK-NEXT: | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | |-value: Int 2 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c b/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c index a4ad08b8bef2..5af0a3918a1c 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c @@ -422,6 +422,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -534,6 +535,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -644,6 +646,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -775,6 +778,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 2 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -906,6 +910,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | |-OMPTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <> nothrow @@ -1070,6 +1075,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | |-OMPTeamsDistributeSimdDirective {{.*}} // CHECK-NEXT: | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | |-value: Int 2 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute.c b/clang/test/AST/ast-dump-openmp-teams-distribute.c index 8c1e6b70cff6..be0e4ce13b60 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute.c @@ -422,6 +422,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 1 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -534,6 +535,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 1 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -644,6 +646,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | | |-OMPTeamsDistributeDirective {{.*}} // CHECK-NEXT: | | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | | |-CapturedDecl {{.*}} <> nothrow @@ -775,6 +778,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | |-OMPTeamsDistributeDirective {{.*}} // CHECK-NEXT: | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | |-value: Int 2 // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | |-CapturedDecl {{.*}} <> nothrow @@ -906,6 +910,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | |-OMPTeamsDistributeDirective {{.*}} // CHECK-NEXT: | | | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | | | |-value: Int 2 // CHECK-NEXT: | | | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | | | |-CapturedDecl {{.*}} <> nothrow @@ -1070,6 +1075,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | |-OMPTeamsDistributeDirective {{.*}} // CHECK-NEXT: | | |-OMPCollapseClause {{.*}} // CHECK-NEXT: | | | `-ConstantExpr {{.*}} 'int' +// CHECK-NEXT: | | | |-value: Int 2 // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 2 // CHECK-NEXT: | | `-CapturedStmt {{.*}} // CHECK-NEXT: | | |-CapturedDecl {{.*}} <> nothrow diff --git a/clang/test/AST/ast-dump-records.c b/clang/test/AST/ast-dump-records.c index 2c22c5395e02..514757de825d 100644 --- a/clang/test/AST/ast-dump-records.c +++ b/clang/test/AST/ast-dump-records.c @@ -15,7 +15,7 @@ struct B; // CHECK: RecordDecl 0x{{[^ ]*}} col:8 struct B struct A { - // CHECK: RecordDecl 0x{{[^ ]*}} prev 0x{{[^ ]*}} line:[[@LINE-1]]:8 struct A definition + // CHECK: RecordDecl 0x{{[^ ]*}} prev 0x{{[^ ]*}} line:[[@LINE-1]]:8 struct A definition int a; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 a 'int' int b, c; @@ -24,14 +24,17 @@ struct A { int d : 12; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 d 'int' // CHECK-NEXT: ConstantExpr 0x{{[^ ]*}} 'int' + // CHECK-NEXT: value: Int 12 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 12 int : 0; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:3 'int' // CHECK-NEXT: ConstantExpr 0x{{[^ ]*}} 'int' + // CHECK-NEXT: value: Int 0 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 0 int e : 10; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 e 'int' // CHECK-NEXT: ConstantExpr 0x{{[^ ]*}} 'int' + // CHECK-NEXT: value: Int 10 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 10 struct B *f; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:13 f 'struct B *' @@ -93,7 +96,7 @@ union F; // CHECK: RecordDecl 0x{{[^ ]*}} col:7 union F union E { - // CHECK: RecordDecl 0x{{[^ ]*}} prev 0x{{[^ ]*}} line:[[@LINE-1]]:7 union E definition + // CHECK: RecordDecl 0x{{[^ ]*}} prev 0x{{[^ ]*}} line:[[@LINE-1]]:7 union E definition int a; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 a 'int' int b, c; @@ -102,14 +105,17 @@ union E { int d : 12; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 d 'int' // CHECK-NEXT: ConstantExpr 0x{{[^ ]*}} 'int' + // CHECK-NEXT: value: Int 12 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 12 int : 0; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:3 'int' // CHECK-NEXT: ConstantExpr 0x{{[^ ]*}} 'int' + // CHECK-NEXT: value: Int 0 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 0 int e : 10; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:7 e 'int' // CHECK-NEXT: ConstantExpr 0x{{[^ ]*}} 'int' + // CHECK-NEXT: value: Int 10 // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 10 struct B *f; // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} col:13 f 'struct B *'