Internals: Add some additional dangling checks. No functional change intended

This commit is contained in:
Wilson Snyder
2025-12-07 13:25:37 -05:00
parent 587f363e03
commit 35a794687b
7 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -1229,7 +1229,7 @@ class DelayedVisitor final : public VNVisitor {
// Replace with result
currp->replaceWith(exprp->resultp()->unlinkFrBack());
// Get rid of the AstExprStmt
VL_DO_DANGLING(pushDeletep(currp), currp);
VL_DO_DANGLING2(pushDeletep(currp), currp, exprp);
} else if (AstVarRef* const refp = VN_CAST(currp, VarRef)) {
// Ignore reads (e.g.: '_[*here*] <= _')
if (refp->access().isReadOnly()) return;