@@ -1501,12 +1501,12 @@ class TaskVisitor final : public VNVisitor {
15011501 if (m_statep->ftaskNoInline (nodep->taskp ())) {
15021502 // Create a fresh variable for each concat array present in pins list
15031503 if (nodep->pinsp ()) {
1504- nodep->pinsp ()->foreachAndNext ([this ](AstArg* arg ) {
1505- AstInitArray* const arrayp = VN_CAST (arg ->exprp (), InitArray);
1504+ nodep->pinsp ()->foreachAndNext ([this ](AstArg* const argp ) {
1505+ AstInitArray* const arrayp = VN_CAST (argp ->exprp (), InitArray);
15061506 if (!arrayp) return ;
15071507
15081508 FileLine* const flp = arrayp->fileline ();
1509- std::string tempName = m_initArrayTmpNames.get (arg );
1509+ const std::string tempName = m_initArrayTmpNames.get (argp );
15101510 AstVar* const substp = new AstVar{flp, VVarType::VAR, tempName, arrayp->dtypep ()};
15111511 substp->funcLocal (true );
15121512 AstVarScope* const substvscp = createVarScope (substp, tempName);
@@ -1515,15 +1515,15 @@ class TaskVisitor final : public VNVisitor {
15151515 flp, new AstVarRef{arrayp->fileline (), substvscp, VAccess::WRITE},
15161516 arrayp->unlinkFrBack ()};
15171517
1518- AstExprStmt* exprstmtp = new AstExprStmt{
1518+ AstExprStmt* const exprstmtp = new AstExprStmt{
15191519 flp, substp, new AstVarRef{arrayp->fileline (), substvscp, VAccess::READ}};
15201520 exprstmtp->stmtsp ()->addNext (assignp);
15211521 exprstmtp->hasResult (false );
15221522
15231523 AstCExpr* const exprp = new AstCExpr{flp, substp->name ()};
15241524 exprp->dtypeSetString ();
15251525 exprstmtp->addStmtsp (new AstCReturn{flp, exprp});
1526- arg ->exprp (exprstmtp);
1526+ argp ->exprp (exprstmtp);
15271527 });
15281528 }
15291529 // This may share VarScope's with a public task, if any. Yuk.
0 commit comments