@@ -1482,7 +1482,7 @@ class OmpVisitor : public virtual DeclarationVisitor {
14821482 return false ;
14831483 }
14841484
1485- bool Pre (const parser::OmpReductionInitializerProc &x) {
1485+ bool Pre (const parser::OmpInitializerProc &x) {
14861486 auto &procDes = std::get<parser::ProcedureDesignator>(x.t );
14871487 auto &name = std::get<parser::Name>(procDes.u );
14881488 auto *symbol{FindSymbol (NonDerivedTypeScope (), name)};
@@ -1496,13 +1496,9 @@ class OmpVisitor : public virtual DeclarationVisitor {
14961496
14971497 bool Pre (const parser::OpenMPDeclareReductionConstruct &x) {
14981498 AddOmpSourceRange (x.source );
1499- parser::OmpClauseList emptyList{std::list<parser::OmpClause>{}};
15001499 ProcessReductionSpecifier (
15011500 std::get<Indirection<parser::OmpReductionSpecifier>>(x.t ).value (),
1502- emptyList);
1503- auto &init =
1504- std::get<std::optional<parser::OmpReductionInitializerClause>>(x.t );
1505- Walk (init);
1501+ std::get<std::optional<parser::OmpClauseList>>(x.t ));
15061502 return false ;
15071503 }
15081504 bool Pre (const parser::OmpMapClause &);
@@ -1659,7 +1655,7 @@ class OmpVisitor : public virtual DeclarationVisitor {
16591655 void ProcessMapperSpecifier (const parser::OmpMapperSpecifier &spec,
16601656 const parser::OmpClauseList &clauses);
16611657 void ProcessReductionSpecifier (const parser::OmpReductionSpecifier &spec,
1662- const parser::OmpClauseList &clauses);
1658+ const std::optional< parser::OmpClauseList> &clauses);
16631659};
16641660
16651661bool OmpVisitor::NeedsScope (const parser::OpenMPBlockConstruct &x) {
@@ -1754,7 +1750,7 @@ void OmpVisitor::ProcessMapperSpecifier(const parser::OmpMapperSpecifier &spec,
17541750
17551751void OmpVisitor::ProcessReductionSpecifier (
17561752 const parser::OmpReductionSpecifier &spec,
1757- const parser::OmpClauseList &clauses) {
1753+ const std::optional< parser::OmpClauseList> &clauses) {
17581754 const auto &id{std::get<parser::OmpReductionIdentifier>(spec.t )};
17591755 if (auto procDes{std::get_if<parser::ProcedureDesignator>(&id.u )}) {
17601756 if (auto *name{std::get_if<parser::Name>(&procDes->u )}) {
@@ -1796,7 +1792,7 @@ bool OmpVisitor::Pre(const parser::OmpDirectiveSpecification &x) {
17961792 if (maybeArgs && maybeClauses) {
17971793 const parser::OmpArgument &first{maybeArgs->front ()};
17981794 if (auto *spec{std::get_if<parser::OmpReductionSpecifier>(&first.u )}) {
1799- ProcessReductionSpecifier (*spec, * maybeClauses);
1795+ ProcessReductionSpecifier (*spec, maybeClauses);
18001796 }
18011797 }
18021798 break ;
0 commit comments