File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
llvm/include/llvm/Frontend/OpenMP Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1- // RUN: %clang_cc1 -verify -fopenmp -DOMP51 -o - %s -Wuninitialized
1+ // RUN: %clang_cc1 -verify -fopenmp-version=51 -fopenmp -DOMP51 -o - %s -Wuninitialized
22
3- // RUN: %clang_cc1 -verify -fopenmp-simd -DOMP51 -o - %s -Wuninitialized
3+ // RUN: %clang_cc1 -verify -fopenmp-version=51 -fopenmp- simd -DOMP51 -o - %s -Wuninitialized
44
55// RUN: %clang_cc1 -verify -fopenmp-version=50 -fopenmp -o - %s -Wuninitialized
66
@@ -42,6 +42,9 @@ int main(int argc, char **argv) {
4242 #pragma omp parallel default(shared)
4343 ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
4444
45+ #pragma omp teams if(x) // expected-error {{unexpected OpenMP clause 'if' in directive '#pragma omp teams'}}
46+ foo ();
47+
4548#ifdef OMP51
4649#pragma omp target
4750#pragma omp teams default(firstprivate) // expected-note 2 {{explicit data sharing attribute requested here}}
@@ -55,6 +58,9 @@ int main(int argc, char **argv) {
5558 ++x; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
5659 ++y; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
5760 }
61+ #pragma omp teams if(x) // expected-error {{unexpected OpenMP clause 'if' in directive '#pragma omp teams'}}
62+ foo ();
63+
5864#endif
5965 return 0 ;
6066}
Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ def OMP_Teams : Directive<"teams"> {
672672 ];
673673 let allowedOnceClauses = [
674674 VersionedClause<OMPC_Default>,
675- VersionedClause<OMPC_If>,
675+ VersionedClause<OMPC_If, 52 >,
676676 VersionedClause<OMPC_NumTeams>,
677677 VersionedClause<OMPC_ThreadLimit>
678678 ];
You can’t perform that action at this time.
0 commit comments