Internals: Add VL_DO_DANGLING in some missing places. No functional change intended.

This commit is contained in:
Wilson Snyder
2026-09-23 18:27:40 -04:00
parent 7fd68b58ca
commit 3d386f8fa5
24 changed files with 58 additions and 57 deletions
+4 -3
View File
@@ -2076,7 +2076,7 @@ class LinkDotFindVisitor final : public VNVisitor {
AstNodeDType* const oldDtp = nodep->childDTypep();
oldDtp->replaceWith(newDtp->cloneTree(false));
oldDtp->deleteTree();
VL_DO_DANGLING(oldDtp->deleteTree(), oldDtp);
}
}
}
@@ -2781,7 +2781,7 @@ private:
}
}
iterateChildren(nodep);
pushDeletep(nodep->unlinkFrBack());
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
}
void visit(AstAliasScope* nodep) override { // ScopeVisitor::
// Defer AliasScope processing - must process outer scopes before inner ones
@@ -6364,7 +6364,8 @@ class LinkDotResolveVisitor final : public VNVisitor {
nodep->v3warn(E_UNSUPPORTED, "Node of type "
<< nodep->targetRefp()->prettyTypeName()
<< " referenced by disable");
pushDeletep(nodep->unlinkFrBack());
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
return;
}
if (nodep->targetp()) {
nodep->targetRefp()->unlinkFrBack()->deleteTree();