summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/cancel_if_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/cancel_if_messages.cpp')
-rw-r--r--clang/test/OpenMP/cancel_if_messages.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/OpenMP/cancel_if_messages.cpp b/clang/test/OpenMP/cancel_if_messages.cpp
index 3d629c927e9..222087ca9e6 100644
--- a/clang/test/OpenMP/cancel_if_messages.cpp
+++ b/clang/test/OpenMP/cancel_if_messages.cpp
@@ -9,6 +9,16 @@ bool foobool(int argc) {
return argc;
}
+void xxx(int argc) {
+ int cond; // expected-note {{initialize the variable 'cond' to silence this warning}}
+#pragma omp parallel
+ {
+#pragma omp cancel parallel if (cond) // expected-warning {{variable 'cond' is uninitialized when used here}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+}
+
struct S1; // expected-note {{declared here}}
template <class T, class S> // expected-note {{declared here}}
OpenPOWER on IntegriCloud