mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: cppcheck fixes. No functional change. (#6687)
This commit is contained in:
+5
-4
@@ -551,10 +551,11 @@ class UnknownVisitor final : public VNVisitor {
|
||||
} else if (!lvalue) { // Mid-multidimension read, just use zero
|
||||
// ARRAYSEL(...) -> ARRAYSEL(COND(LT(bit<maxbit), bit, 0))
|
||||
VNRelinker replaceHandle;
|
||||
AstNodeExpr* const bitp = nodep->bitp()->unlinkFrBack(&replaceHandle);
|
||||
AstNodeExpr* const newp = new AstCond{
|
||||
bitp->fileline(), condp, bitp,
|
||||
new AstConst{bitp->fileline(), AstConst::WidthedValue{}, bitp->width(), 0}};
|
||||
AstNodeExpr* const asBitp = nodep->bitp()->unlinkFrBack(&replaceHandle);
|
||||
AstNodeExpr* const newp
|
||||
= new AstCond{asBitp->fileline(), condp, asBitp,
|
||||
new AstConst{asBitp->fileline(), AstConst::WidthedValue{},
|
||||
asBitp->width(), 0}};
|
||||
// Added X's, tristate them too
|
||||
UINFOTREE(9, newp, "", "_new");
|
||||
replaceHandle.relink(newp);
|
||||
|
||||
Reference in New Issue
Block a user