diff options
Diffstat (limited to 'clang/test/OpenMP/teams_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/teams_messages.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/OpenMP/teams_messages.cpp b/clang/test/OpenMP/teams_messages.cpp index 8196140be76..1154220a18c 100644 --- a/clang/test/OpenMP/teams_messages.cpp +++ b/clang/test/OpenMP/teams_messages.cpp @@ -1,6 +1,7 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp45 -fopenmp -std=c++11 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp45 -fopenmp-simd -std=c++11 -o - %s -Wuninitialized void xxx(int argc) { int x; // expected-note {{initialize the variable 'x' to silence this warning}} @@ -15,6 +16,8 @@ void foo() { #pragma omp teams // expected-error {{unexpected OpenMP directive '#pragma omp teams'}} int main(int argc, char **argv) { + #pragma omp teams // omp45-error {{orphaned 'omp teams' directives are prohibited; perhaps you forget to enclose the directive into a target region?}} + ; #pragma omp target #pragma omp teams f; // expected-error {{use of undeclared identifier 'f'}} |

