summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/simd_linear_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/simd_linear_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/simd_linear_messages.cpp')
-rw-r--r--clang/test/OpenMP/simd_linear_messages.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/OpenMP/simd_linear_messages.cpp b/clang/test/OpenMP/simd_linear_messages.cpp
index fa2690616cd..964439277b6 100644
--- a/clang/test/OpenMP/simd_linear_messages.cpp
+++ b/clang/test/OpenMP/simd_linear_messages.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
namespace X {
@@ -104,7 +104,7 @@ S3 h;
template<class I, class C> int foomain(I argc, C **argv) {
I e(4);
I g(5);
- int i;
+ int i, z;
int &j = i;
#pragma omp simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -140,7 +140,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
for (int k = 0; k < argc; ++k) ++k;
#pragma omp simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}}
for (int k = 0; k < argc; ++k) ++k;
- #pragma omp simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+ #pragma omp simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}}
for (int k = 0; k < argc; ++k) ++k;
@@ -195,7 +195,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
- int i;
+ int i, z;
int &j = i;
#pragma omp simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}}
for (int k = 0; k < argc; ++k) ++k;
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
for (int k = 0; k < argc; ++k) ++k;
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
- #pragma omp simd linear(a, b)
+ #pragma omp simd linear(a, b, z)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp simd linear (argv[1]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k) ++k;
OpenPOWER on IntegriCloud