diff options
Diffstat (limited to 'clang/test/OpenMP/for_linear_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/for_linear_messages.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/OpenMP/for_linear_messages.cpp b/clang/test/OpenMP/for_linear_messages.cpp index 3a54acb26b5..363bbdbbe9d 100644 --- a/clang/test/OpenMP/for_linear_messages.cpp +++ b/clang/test/OpenMP/for_linear_messages.cpp @@ -3,6 +3,14 @@ // RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; + +void xxx(int argc) { + int i, lin, step; // expected-note {{initialize the variable 'lin' to silence this warning}} expected-note {{initialize the variable 'step' to silence this warning}} +#pragma omp for linear(lin : step) // expected-warning {{variable 'lin' is uninitialized when used here}} expected-warning {{variable 'step' is uninitialized when used here}} + for (i = 0; i < 10; ++i) + ; +} + namespace X { int x; }; |