diff --git a/src/V3Active.cpp b/src/V3Active.cpp index b1629b4b8..92a9c0918 100644 --- a/src/V3Active.cpp +++ b/src/V3Active.cpp @@ -753,7 +753,7 @@ public: // Release the owned AstSenTree nodes that were unlinked from AstCovergroup during // the first pass; they are no longer needed after all clones have been made. - for (auto& [classp, evtp] : m_covergroupEvents) VL_DO_DANGLING(evtp->deleteTree(), evtp); + for (const auto& itpair : m_covergroupEvents) itpair.second->deleteTree(); UINFO(4, "CovergroupSamplingVisitor: Complete" << endl); } diff --git a/src/V3Covergroup.cpp b/src/V3Covergroup.cpp index 0e82edfcf..e6d9a01cd 100644 --- a/src/V3Covergroup.cpp +++ b/src/V3Covergroup.cpp @@ -859,7 +859,7 @@ class FunctionalCoverageVisitor final : public VNVisitor { // Build condition for a single transition item. // Returns expression that checks if exprp matches the item's value/range list. - // Overload for when the expression is a variable read — creates and manages the VarRef + // Overload for when the expression is a variable read -- creates and manages the VarRef // internally, so callers don't need to construct a temporary node. AstNodeExpr* buildTransitionItemCondition(AstCoverTransItem* itemp, AstVar* varp) { AstNodeExpr* varRefp = new AstVarRef{varp->fileline(), varp, VAccess::READ}; diff --git a/test_regress/t/t_covergroup_iff.v b/test_regress/t/t_covergroup_iff.v index 8b3778ac2..c3f776c70 100644 --- a/test_regress/t/t_covergroup_iff.v +++ b/test_regress/t/t_covergroup_iff.v @@ -7,8 +7,8 @@ // Test iff (enable) guard: sampling is gated by the enable condition. // Samples taken while enable=0 must not increment bins. -// Bins 'disabled_*' are sampled only with enable=0 — they must NOT appear in -// coverage.dat. Bins 'enabled_*' are sampled only with enable=1 — they must +// Bins 'disabled_*' are sampled only with enable=0 -- they must NOT appear in +// coverage.dat. Bins 'enabled_*' are sampled only with enable=1 -- they must // appear. This makes pass/fail unambiguous from the coverage report alone. module t; @@ -27,12 +27,12 @@ module t; cg_iff cg = new; initial begin - // Sample disabled_lo and disabled_hi with enable=0 — must not be recorded + // Sample disabled_lo and disabled_hi with enable=0 -- must not be recorded enable = 0; value = 1; cg.sample(); value = 2; cg.sample(); - // Sample enabled_lo and enabled_hi with enable=1 — must be recorded + // Sample enabled_lo and enabled_hi with enable=1 -- must be recorded enable = 1; value = 3; cg.sample(); value = 4; cg.sample();