diff options
Diffstat (limited to 'clang/test/OpenMP/task_firstprivate_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/task_firstprivate_messages.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/OpenMP/task_firstprivate_messages.cpp b/clang/test/OpenMP/task_firstprivate_messages.cpp index b8ff2cdebc9..fa0436ace64 100644 --- a/clang/test/OpenMP/task_firstprivate_messages.cpp +++ b/clang/test/OpenMP/task_firstprivate_messages.cpp @@ -19,6 +19,13 @@ bool foobool(int argc) { return argc; } +void xxx(int argc) { + int fp, fp1; // expected-note {{initialize the variable 'fp' to silence this warning}} expected-note {{initialize the variable 'fp1' to silence this warning}} +#pragma omp task firstprivate(fp) // expected-warning {{variable 'fp' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ++fp1; // expected-warning {{variable 'fp1' is uninitialized when used here}} +} + template <typename T> struct S { T b; |

