File tree Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -773,6 +773,20 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Linear &x) {
773773 }
774774}
775775
776+ void OmpStructureChecker::Enter (const parser::OmpClause::Sizes &c) {
777+ CheckAllowedClause (llvm::omp::Clause::OMPC_sizes);
778+ for (const parser::Cosubscript &v : c.v )
779+ RequiresPositiveParameter (llvm::omp::Clause::OMPC_sizes, v,
780+ /* paramName=*/ " parameter" , /* allowZero=*/ false );
781+ }
782+
783+ void OmpStructureChecker::Enter (const parser::OmpClause::Looprange &x) {
784+ CheckAllowedClause (llvm::omp::Clause::OMPC_looprange);
785+ auto &[first, count]{x.v .t };
786+ RequiresConstantPositiveParameter (llvm::omp::Clause::OMPC_looprange, count);
787+ RequiresConstantPositiveParameter (llvm::omp::Clause::OMPC_looprange, first);
788+ }
789+
776790void OmpStructureChecker::Enter (const parser::DoConstruct &x) {
777791 Base::Enter (x);
778792 loopStack_.push_back (&x);
Original file line number Diff line number Diff line change @@ -3393,21 +3393,6 @@ void OmpStructureChecker::Enter(const parser::OmpClause &x) {
33933393 }
33943394}
33953395
3396- void OmpStructureChecker::Enter (const parser::OmpClause::Sizes &c) {
3397- CheckAllowedClause (llvm::omp::Clause::OMPC_sizes);
3398- for (const parser::Cosubscript &v : c.v )
3399- RequiresPositiveParameter (llvm::omp::Clause::OMPC_sizes, v,
3400- /* paramName=*/ " parameter" , /* allowZero=*/ false );
3401- }
3402-
3403- void OmpStructureChecker::Enter (const parser::OmpClause::Looprange &x) {
3404- CheckAllowedClause (llvm::omp::Clause::OMPC_looprange);
3405- auto &first = std::get<0 >(x.v .t );
3406- auto &count = std::get<1 >(x.v .t );
3407- RequiresConstantPositiveParameter (llvm::omp::Clause::OMPC_looprange, count);
3408- RequiresConstantPositiveParameter (llvm::omp::Clause::OMPC_looprange, first);
3409- }
3410-
34113396// Restrictions specific to each clause are implemented apart from the
34123397// generalized restrictions.
34133398
You can’t perform that action at this time.
0 commit comments