diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 0b5ac00ba2..2fd4d92393 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -3328,8 +3328,8 @@ class LinkDotResolveVisitor final : public VNVisitor { iterateAndNextNull(nodep->thsp()); } - if (nodep->attrp() != nullptr) { - AstNode* attrp = nodep->attrp()->unlinkFrBack(); + if (nodep->attrp()) { + AstNode* const attrp = nodep->attrp()->unlinkFrBack(); VL_DO_DANGLING(attrp->deleteTree(), attrp); } AstNode* const basefromp = AstArraySel::baseFromp(nodep, false);