diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2016-11-10 08:49:37 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2016-11-10 08:49:37 +0000 |
commit | 8323711b075b24d12b58fce2d033129bd0bb2549 (patch) | |
tree | 5d08ae8a69d74be6fe1daad3de4aaefeb802421c /test/OpenMP/teams_distribute_simd_ast_print.cpp | |
parent | 3b61b92e0fdf5093a247270ef1265c85697de3f9 (diff) |
Make output of -ast-print a valid C++ code.
Output generated by option -ast-print looks like C/C++ code, and it
really is for plain C. For C++ the produced output was not valid C++
code, but the differences were small. With this change the output
is fixed and can be compiled. Tests are changed so that output produced
by -ast-print is compiled again with the same flags and both outputs are
compared.
Option -ast-print is extensively used in clang tests but it itself
was tested poorly, existing tests only checked that compiler did not
crash. There are unit tests in file DeclPrinterTest.cpp, but they test
only terse output mode.
Differential Revision: https://reviews.llvm.org/D26452
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/teams_distribute_simd_ast_print.cpp')
-rw-r--r-- | test/OpenMP/teams_distribute_simd_ast_print.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/OpenMP/teams_distribute_simd_ast_print.cpp b/test/OpenMP/teams_distribute_simd_ast_print.cpp index 5b988eedce..aaf6745774 100644 --- a/test/OpenMP/teams_distribute_simd_ast_print.cpp +++ b/test/OpenMP/teams_distribute_simd_ast_print.cpp @@ -54,8 +54,6 @@ public: } }; // CHECK: #pragma omp target -// CHECK-NEXT: #pragma omp teams distribute simd private(this->a) private(this->a) private(this->S::a) -// CHECK: #pragma omp target // CHECK-NEXT: #pragma omp teams distribute simd private(this->a) private(this->a) private(T::a) // CHECK: #pragma omp target // CHECK-NEXT: #pragma omp teams distribute simd private(this->a) private(this->a) @@ -63,6 +61,8 @@ public: // CHECK-NEXT: #pragma omp teams distribute simd default(none) private(b) firstprivate(argv) shared(d) reduction(+: c) reduction(max: e) num_teams(f) thread_limit(d) // CHECK: #pragma omp target // CHECK-NEXT: #pragma omp teams distribute simd simdlen(slen1) safelen(slen2) aligned(arr: alen) +// CHECK: #pragma omp target +// CHECK-NEXT: #pragma omp teams distribute simd private(this->a) private(this->a) private(this->S::a) class S8 : public S7<S> { S8() {} |