We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e7c0af commit 33d63a3Copy full SHA for 33d63a3
flang/lib/Semantics/rewrite-parse-tree.cpp
@@ -410,9 +410,11 @@ bool RewriteMutator::Pre(parser::OpenMPLoopConstruct &ompLoop) {
410
// call OpenMPSimdOnly on the nested loop block while indicating where
411
// the block comes from.
412
auto &nest = std::get<std::optional<parser::NestedConstruct>>(ompLoop.t);
413
- if (nest.has_value()) {
414
- auto &doConstruct = std::get<parser::DoConstruct>(nest.value());
415
- auto &innerBlock = std::get<parser::Block>(doConstruct.t);
+ if (!nest.has_value()) {
+ return true;
+ }
416
+ if (auto *doConstruct = std::get_if<parser::DoConstruct>(&*nest)) {
417
+ auto &innerBlock = std::get<parser::Block>(doConstruct->t);
418
OpenMPSimdOnly(innerBlock, /*isNonSimdLoopBody=*/true);
419
}
420
0 commit comments