summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-07-08 15:45:24 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-07-08 15:45:24 +0000
commita914888b49590a38f4571434ddf951c687889e56 (patch)
tree9eefc6e2030d0706e91c35cfe5d31c85ddd39e0b /clang/test/OpenMP/taskgroup_task_reduction_messages.cpp
parent320a28200f24452b224fb472529adba0964399ab (diff)
downloadbcm5719-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/taskgroup_task_reduction_messages.cpp')
-rw-r--r--clang/test/OpenMP/taskgroup_task_reduction_messages.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp b/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp
index 64d7c6c3ca1..fe7baf4091d 100644
--- a/clang/test/OpenMP/taskgroup_task_reduction_messages.cpp
+++ b/clang/test/OpenMP/taskgroup_task_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
extern int omp_default_mem_alloc;
void foo() {
@@ -85,7 +85,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 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -137,7 +137,7 @@ T tmain(T argc) {
foo();
#pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
foo();
-#pragma omp taskgroup task_reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
+#pragma omp taskgroup task_reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}}
foo();
#pragma omp parallel private(k)
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}}
@@ -178,7 +178,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 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp taskgroup task_reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
foo();
-#pragma omp taskgroup task_reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp taskgroup task_reduction(+ : o, z) // expected-error {{no viable overloaded '='}}
foo();
#pragma omp parallel private(k)
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}}
OpenPOWER on IntegriCloud