TMP: Return nullptr in unhandled cases

Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
This commit is contained in:
Ryszard Rozak 2026-01-19 16:12:29 +01:00
parent 442f4a3a72
commit 0efe6c735e
1 changed files with 3 additions and 1 deletions

View File

@ -188,7 +188,7 @@ public:
return new AstAssign{flp, lhsp, forcedUpdate(vscp, lhsp, lhsVarRefp)};
} else if (const AstStructDType* const structDtypep
= VN_CAST(lhsDtypep, StructDType)) {
return nullptr;
} else if (const AstUnpackArrayDType* const arrayDtypep
= VN_CAST(lhsDtypep, UnpackArrayDType)) {
AstVar* const loopVarp = new AstVar{flp, VVarType::MODULETEMP,
@ -218,6 +218,8 @@ public:
new AstAdd{flp, readRefp->cloneTree(false), new AstConst{flp, 1}}};
currWhilep->addStmtsp(currIncrp);
return currInitp;
} else {
return nullptr;
}
}
static AstNodeExpr* applySelects(AstNodeExpr* exprp,