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/target_parallel_reduction_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/target_parallel_reduction_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/target_parallel_reduction_messages.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/test/OpenMP/target_parallel_reduction_messages.cpp b/clang/test/OpenMP/target_parallel_reduction_messages.cpp index eca57a8cce7..929d6af18cd 100644 --- a/clang/test/OpenMP/target_parallel_reduction_messages.cpp +++ b/clang/test/OpenMP/target_parallel_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { foo(); #pragma omp target parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); @@ -192,7 +192,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -220,7 +220,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel reduction(~ : argc) // expected-error {{expected unqualified-id}} foo(); -#pragma omp target parallel reduction(&& : argc) +#pragma omp target parallel reduction(&& : argc, z) foo(); #pragma omp target parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); |