diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-08 15:45:24 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-08 15:45:24 +0000 |
commit | a914888b49590a38f4571434ddf951c687889e56 (patch) | |
tree | 9eefc6e2030d0706e91c35cfe5d31c85ddd39e0b /clang/test/OpenMP/taskloop_final_messages.cpp | |
parent | 320a28200f24452b224fb472529adba0964399ab (diff) | |
download | bcm5719-llvm-a914888b49590a38f4571434ddf951c687889e56.tar.gz bcm5719-llvm-a914888b49590a38f4571434ddf951c687889e56.zip |
[OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
NFC.
llvm-svn: 365334
Diffstat (limited to 'clang/test/OpenMP/taskloop_final_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/taskloop_final_messages.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/test/OpenMP/taskloop_final_messages.cpp b/clang/test/OpenMP/taskloop_final_messages.cpp index d53b12322e9..f7ef2959df3 100644 --- a/clang/test/OpenMP/taskloop_final_messages.cpp +++ b/clang/test/OpenMP/taskloop_final_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2]) +#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}} @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -66,7 +68,7 @@ int main(int argc, char **argv) { #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2]) +#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}} |