diff options
author | Kelvin Li <kkwli0@gmail.com> | 2016-07-26 04:32:50 +0000 |
---|---|---|
committer | Kelvin Li <kkwli0@gmail.com> | 2016-07-26 04:32:50 +0000 |
commit | 2b51f7284b293f4cda9ba2368e9a93dc98604ed7 (patch) | |
tree | 606078f187482da172876de96c30eb7a423009d0 /clang/test | |
parent | 06ac2f4a7e72d9635d78e4a7c6a88746a6060a4a (diff) | |
download | bcm5719-llvm-2b51f7284b293f4cda9ba2368e9a93dc98604ed7.tar.gz bcm5719-llvm-2b51f7284b293f4cda9ba2368e9a93dc98604ed7.zip |
[OpenMP] diagnose orphaned teams construct
The OpenMP spec mandates that 'a teams construct must be contained within a
target construct'. Currently, this scenario is not diagnosed. This patch is
to add check for orphaned teams construct and issue an error message.
Differential Revision: https://reviews.llvm.org/D22785
llvm-svn: 276726
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/OpenMP/nesting_of_regions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/OpenMP/nesting_of_regions.cpp b/clang/test/OpenMP/nesting_of_regions.cpp index 13ef64fc27e..6c44d94a67b 100644 --- a/clang/test/OpenMP/nesting_of_regions.cpp +++ b/clang/test/OpenMP/nesting_of_regions.cpp @@ -3693,6 +3693,8 @@ void foo() { } // TEAMS DIRECTIVE +#pragma omp teams // expected-error {{orphaned 'omp teams' directives are prohibited; perhaps you forget to enclose the directive into a target region?}} + bar(); #pragma omp target #pragma omp teams #pragma omp parallel |