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{
187187// Directive sets for groups of multiple directives
188188// ===----------------------------------------------------------------------===//
189189
190- // Directive sets for parent directives that do allow/not allow a construct
191- static const OmpDirectiveSet scanAllowedSet{allDoSet | allSimdSet};
192-
193190// Directive sets that form Composite constructs
194191static const OmpDirectiveSet allDistributeParallelDoSet{
195192 allDistributeSet & allParallelSet & allDoSet};
@@ -293,6 +290,11 @@ static const OmpDirectiveSet workShareSet{
293290 } | allDoSet,
294291};
295292
293+ // ===----------------------------------------------------------------------===//
294+ // Directive sets for parent directives that do allow/not allow a construct
295+ static const OmpDirectiveSet scanParentAllowedSet{allDoSet | allSimdSet};
296+ // ===----------------------------------------------------------------------===//
297+
296298// ===----------------------------------------------------------------------===//
297299// Directive sets for allowed/not allowed nested directives
298300// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -2990,7 +2990,7 @@ void OmpStructureChecker::CheckReductionModifier(
29902990 // or "simd" directive.
29912991 // The worksharing-loop directives are OMPD_do and OMPD_for. Only the
29922992 // former is allowed in Fortran.
2993- if (!llvm::omp::scanAllowedSet .test (dirCtx.directive )) {
2993+ if (!llvm::omp::scanParentAllowedSet .test (dirCtx.directive )) {
29942994 context_.Say (GetContext ().clauseSource ,
29952995 " Modifier 'INSCAN' on REDUCTION clause is only allowed with "
29962996 " worksharing-loop, worksharing-loop simd, "
Original file line number Diff line number Diff line change @@ -1644,7 +1644,7 @@ bool OmpAttributeVisitor::Pre(
16441644 " Exactly one of `exclusive` or `inclusive` clause is expected" _err_en_US);
16451645 }
16461646 if (!parentContext ||
1647- !llvm::omp::scanAllowedSet .test (parentContext->directive )) {
1647+ !llvm::omp::scanParentAllowedSet .test (parentContext->directive )) {
16481648 context_.Say (standaloneDir.source ,
16491649 " Orphaned `omp scan` directives are prohibited; perhaps you forgot "
16501650 " to enclose the directive in to a worksharing loop, a worksharing "
You can’t perform that action at this time.
0 commit comments