[flang-commits] [flang] [Flang][OpenMP] Add Semantics support for Nested OpenMPLoopConstructs (PR #145917)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Thu Jun 26 11:30:18 PDT 2025
================
@@ -5025,7 +5025,9 @@ struct OpenMPLoopConstruct {
TUPLE_CLASS_BOILERPLATE(OpenMPLoopConstruct);
OpenMPLoopConstruct(OmpBeginLoopDirective &&a)
: t({std::move(a), std::nullopt, std::nullopt}) {}
- std::tuple<OmpBeginLoopDirective, std::optional<DoConstruct>,
+ std::tuple<OmpBeginLoopDirective,
+ std::optional<
+ std::variant<DoConstruct, common::Indirection<OpenMPLoopConstruct>>>,
----------------
kparzysz wrote:
You can add a type alias for this, like
```
using NestedConstruct = std::variant<...>;
std::tuple<OmpBeginLoopDirective, std::optional<NestedConstruct>, ...
```
The full thing is spelled out in several places, it would make the code more readable.
https://github.com/llvm/llvm-project/pull/145917
More information about the flang-commits
mailing list