[flang-commits] [flang] [llvm] [Flang][OpenMP][Sema] Adding parsing and semantic support for scan directive. (PR #102792)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Fri Sep 13 06:24:28 PDT 2024


================
@@ -2491,14 +2615,12 @@ void OmpStructureChecker::CheckReductionTypeList(
 }
 
 void OmpStructureChecker::CheckReductionModifier(
-    const parser::OmpClause::Reduction &x) {
+    const parser::OmpReductionClause::ReductionModifier &modifier) {
   using ReductionModifier = parser::OmpReductionClause::ReductionModifier;
-  const auto &maybeModifier{std::get<std::optional<ReductionModifier>>(x.v.t)};
-  if (!maybeModifier || *maybeModifier == ReductionModifier::Default) {
-    // No modifier, or the default one is always ok.
+  if (modifier == ReductionModifier::Default) {
+    // the default one is always ok.
----------------
skatrak wrote:

```suggestion
    // The default one is always ok.
```

https://github.com/llvm/llvm-project/pull/102792


More information about the flang-commits mailing list