File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3013,8 +3013,17 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Linear &x) {
3013
3013
}
3014
3014
}
3015
3015
3016
- auto checkForValidLinearClause = [&](const parser::Name &name, bool is_ref) {
3017
- parser::CharBlock source{GetContext ().clauseSource };
3016
+ // 4.4.4 Ordered clause restriction
3017
+ if (const auto *clause{
3018
+ FindClause (GetContext (), llvm::omp::Clause::OMPC_ordered)}) {
3019
+ const auto &orderedClause{std::get<parser::OmpClause::Ordered>(clause->u )};
3020
+ if (orderedClause.v ) {
3021
+ return ;
3022
+ }
3023
+ }
3024
+
3025
+ auto checkForValidLinearClaue = [&](const parser::Name &name, bool is_ref) {
3026
+ parser::CharBlock source = GetContext ().clauseSource ;
3018
3027
std::string listItemName{name.ToString ()};
3019
3028
if (!is_ref && !name.symbol ->GetType ()->IsNumeric (TypeCategory::Integer)) {
3020
3029
context_.Say (source,
You can’t perform that action at this time.
0 commit comments