[llvm-branch-commits] [flang] [flang][OpenMP] Do not register DECLARE_REDUCTIONs in METADIRECTIVEs (PR #243868)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Nov 19 10:57:34 PST 2026
================
@@ -2194,6 +2195,28 @@ void OmpVisitor::ProcessMapperSpecifier(const parser::OmpMapperSpecifier &spec,
void OmpVisitor::ProcessReductionSpecifier(
const parser::OmpReductionSpecifier &spec,
const parser::OmpClauseList &clauses) {
+ // Even if this directive is invalid or ignored for any reason, there is
+ // still some processing that needs to happen in order for all Name's
+ // embedded in the reduction specifier and the clauses to have symbols.
+ bool ignore{false};
+
+ if (!declaratives_.back()) {
----------------
chichunchen wrote:
nit: The !declaratives_.back() case is already covered by the check below: a null ompDecl gives OMPD_nothing, which sets ignore.
https://github.com/llvm/llvm-project/pull/243868
More information about the llvm-branch-commits
mailing list