File tree 2 files changed +9
-3
lines changed
llvm/include/llvm/Frontend/OpenMP 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
2
2
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
4
4
5
5
// RUN: %clang_cc1 -verify -fopenmp-version=50 -fopenmp -o - %s -Wuninitialized
6
6
@@ -42,6 +42,9 @@ int main(int argc, char **argv) {
42
42
#pragma omp parallel default(shared)
43
43
++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
44
44
45
+ #pragma omp teams if(x) // expected-error {{unexpected OpenMP clause 'if' in directive '#pragma omp teams'}}
46
+ foo ();
47
+
45
48
#ifdef OMP51
46
49
#pragma omp target
47
50
#pragma omp teams default(firstprivate) // expected-note 2 {{explicit data sharing attribute requested here}}
@@ -55,6 +58,9 @@ int main(int argc, char **argv) {
55
58
++x; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
56
59
++y; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
57
60
}
61
+ #pragma omp teams if(x) // expected-error {{unexpected OpenMP clause 'if' in directive '#pragma omp teams'}}
62
+ foo ();
63
+
58
64
#endif
59
65
return 0 ;
60
66
}
Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ def OMP_Teams : Directive<"teams"> {
672
672
];
673
673
let allowedOnceClauses = [
674
674
VersionedClause<OMPC_Default>,
675
- VersionedClause<OMPC_If>,
675
+ VersionedClause<OMPC_If, 52 >,
676
676
VersionedClause<OMPC_NumTeams>,
677
677
VersionedClause<OMPC_ThreadLimit>
678
678
];
You can’t perform that action at this time.
0 commit comments