diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-09-11 15:44:06 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-09-11 15:44:06 +0000 |
commit | 1be634044ddb1286e3f1759adf62c0755c3552bd (patch) | |
tree | 40732ab132eb52d4c14401a744ccf1305fd4295e /clang/test/OpenMP/parallel_for_loop_messages.cpp | |
parent | 00c1ee48e4cf2a6ce67dc96342b1b07625d0a7b4 (diff) | |
download | bcm5719-llvm-1be634044ddb1286e3f1759adf62c0755c3552bd.tar.gz bcm5719-llvm-1be634044ddb1286e3f1759adf62c0755c3552bd.zip |
[OPENMP] Update the diagnosis message for canonical loop form, by Chi
Chun Chen.
The previous patch (https://reviews.llvm.org/D54441) support the
relational-op != very well for openmp canonical loop form, however,
it didn't update the diagnosis message. So this patch is simply
update the diagnosis message by adding !=, update the test
related to it, and update the section number for canonical loop
form for OpenMP 5.0 in comment.
Differential Revision: https://reviews.llvm.org/D66559
llvm-svn: 371631
Diffstat (limited to 'clang/test/OpenMP/parallel_for_loop_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/parallel_for_loop_messages.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/clang/test/OpenMP/parallel_for_loop_messages.cpp b/clang/test/OpenMP/parallel_for_loop_messages.cpp index f1314943b35..c234b52899f 100644 --- a/clang/test/OpenMP/parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/parallel_for_loop_messages.cpp @@ -1,6 +1,8 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized class S { int a; @@ -92,28 +94,28 @@ int test_iteration_spaces() { for (((ii)) = 0; ii < 10; ++ii) c[ii] = a[ii]; -// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} +// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}} #pragma omp parallel for for (int i = 0; i; i++) c[i] = a[i]; -// expected-error@+3 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} +// omp4-error@+3 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+3 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}} // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'i'}} #pragma omp parallel for for (int i = 0; jj < kk; ii++) c[i] = a[i]; -// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} +// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}} #pragma omp parallel for for (int i = 0; !!i; i++) c[i] = a[i]; -// Ok +// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} #pragma omp parallel for for (int i = 0; i != 1; i++) c[i] = a[i]; -// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} +// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}} omp5-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'i'}} #pragma omp parallel for for (int i = 0;; i++) c[i] = a[i]; @@ -416,15 +418,15 @@ int test_with_random_access_iterator() { #pragma omp parallel for for (begin = end; begin < end; ++begin) ++begin; -// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} +// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} omp5-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'I'}} #pragma omp parallel for for (GoodIter I = begin; I - I; ++I) ++I; -// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} +// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} omp5-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'I'}} #pragma omp parallel for for (GoodIter I = begin; begin < end; ++I) ++I; -// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} +// omp4-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}} omp5-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable 'I'}} #pragma omp parallel for for (GoodIter I = begin; !I; ++I) ++I; |