File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -187,9 +187,6 @@ static const OmpDirectiveSet allTeamsSet{
187
187
// Directive sets for groups of multiple directives
188
188
// ===----------------------------------------------------------------------===//
189
189
190
- // Directive sets for parent directives that do allow/not allow a construct
191
- static const OmpDirectiveSet scanAllowedSet{allDoSet | allSimdSet};
192
-
193
190
// Directive sets that form Composite constructs
194
191
static const OmpDirectiveSet allDistributeParallelDoSet{
195
192
allDistributeSet & allParallelSet & allDoSet};
@@ -293,6 +290,11 @@ static const OmpDirectiveSet workShareSet{
293
290
} | allDoSet,
294
291
};
295
292
293
+ // ===----------------------------------------------------------------------===//
294
+ // Directive sets for parent directives that do allow/not allow a construct
295
+ static const OmpDirectiveSet scanParentAllowedSet{allDoSet | allSimdSet};
296
+ // ===----------------------------------------------------------------------===//
297
+
296
298
// ===----------------------------------------------------------------------===//
297
299
// Directive sets for allowed/not allowed nested directives
298
300
// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -2990,7 +2990,7 @@ void OmpStructureChecker::CheckReductionModifier(
2990
2990
// or "simd" directive.
2991
2991
// The worksharing-loop directives are OMPD_do and OMPD_for. Only the
2992
2992
// former is allowed in Fortran.
2993
- if (!llvm::omp::scanAllowedSet .test (dirCtx.directive )) {
2993
+ if (!llvm::omp::scanParentAllowedSet .test (dirCtx.directive )) {
2994
2994
context_.Say (GetContext ().clauseSource ,
2995
2995
" Modifier 'INSCAN' on REDUCTION clause is only allowed with "
2996
2996
" worksharing-loop, worksharing-loop simd, "
Original file line number Diff line number Diff line change @@ -1644,7 +1644,7 @@ bool OmpAttributeVisitor::Pre(
1644
1644
" Exactly one of `exclusive` or `inclusive` clause is expected" _err_en_US);
1645
1645
}
1646
1646
if (!parentContext ||
1647
- !llvm::omp::scanAllowedSet .test (parentContext->directive )) {
1647
+ !llvm::omp::scanParentAllowedSet .test (parentContext->directive )) {
1648
1648
context_.Say (standaloneDir.source ,
1649
1649
" Orphaned `omp scan` directives are prohibited; perhaps you forgot "
1650
1650
" to enclose the directive in to a worksharing loop, a worksharing "
You can’t perform that action at this time.
0 commit comments