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

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Nov 21 10:56:18 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)};
----------------
kiranchandramohan wrote:

It took me a bit to process that reduction identifiers are modifiers also. Was that established in OpenMP 5.2?

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


More information about the flang-commits mailing list