[llvm-branch-commits] [flang] [flang][OpenMP] Use OmpDirectiveSpecification in DECLARE_REDUCTION (PR #160192)

Krzysztof Parzyszek via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 23 06:29:33 PDT 2025


================
@@ -1559,12 +1559,7 @@ class OmpVisitor : public virtual DeclarationVisitor {
 
   bool Pre(const parser::OpenMPDeclareReductionConstruct &x) {
     AddOmpSourceRange(x.source);
-    parser::OmpClauseList empty(std::list<parser::OmpClause>{});
-    auto &maybeClauses{std::get<std::optional<parser::OmpClauseList>>(x.t)};
-    ProcessReductionSpecifier(
----------------
kparzysz wrote:

>From "Pre(OmpDirectiveSpecification)": https://github.com/llvm/llvm-project/pull/160192/files#diff-811aa8b10475f6ccddbcb8e4e746c4ee840eac6ebd73c0152b5d33be961f07ecR1989-R1992

The only way to encounter OmpReductionSpecifier is as an argument to the DECLARE MAPPER directive, and the directive arguments are now resolved in the handler for OmpDirectiveSpecification.

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


More information about the llvm-branch-commits mailing list