[flang-commits] [flang] [llvm] [flang][OpenMP] Apply modifier representation to semantic checks (PR #116658)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Thu Nov 21 11:11:13 PST 2024


================
@@ -518,8 +519,14 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
   }
 
   bool Pre(const parser::OmpClause::Reduction &x) {
-    const parser::OmpReductionIdentifier &opr{
-        std::get<parser::OmpReductionIdentifier>(x.v.t)};
+    const auto &objList{std::get<parser::OmpObjectList>(x.v.t)};
+    ResolveOmpObjectList(objList, Symbol::Flag::OmpReduction);
+
+    auto &modifiers{OmpGetModifiers(x.v)};
----------------
kparzysz wrote:

In explicit terms, yes.  Before 5.2 it was a de facto modifier by the virtue of being on the left side of a `:`, e.g. `reduction(+: x, y, z)`.  In 5.2 all such things are modifiers (there are also a couple of post-modifiers, i.e. following a `:`).

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


More information about the flang-commits mailing list