diff options
Diffstat (limited to 'clang/test/OpenMP/task_if_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/task_if_messages.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/OpenMP/task_if_messages.cpp b/clang/test/OpenMP/task_if_messages.cpp index 305af22149d..2d47b32b9a1 100644 --- a/clang/test/OpenMP/task_if_messages.cpp +++ b/clang/test/OpenMP/task_if_messages.cpp @@ -9,6 +9,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int cond; // expected-note {{initialize the variable 'cond' to silence this warning}} +#pragma omp task 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}} |