Internals: cppcheck fixes. No functional change. (#6687)

This commit is contained in:
Wilson Snyder
2025-11-12 18:54:22 -05:00
committed by GitHub
parent 67094f6a88
commit 5c0ad5bd1f
38 changed files with 122 additions and 111 deletions
+3 -4
View File
@@ -280,9 +280,8 @@ class AssertVisitor final : public VNVisitor {
return newp;
}
static AstIf* assertCond(AstNodeCoverOrAssert* nodep, AstNodeExpr* propp, AstNode* passsp,
AstNode* failsp) {
static AstIf* assertCond(const AstNodeCoverOrAssert* nodep, AstNodeExpr* propp,
AstNode* passsp, AstNode* failsp) {
AstIf* const ifp = new AstIf{nodep->fileline(), propp, passsp, failsp};
// It's more LIKELY that we'll take the nullptr if clause
// than the sim-killing else clause:
@@ -291,7 +290,7 @@ class AssertVisitor final : public VNVisitor {
return ifp;
}
AstNode* assertBody(AstNodeCoverOrAssert* nodep, AstNode* propp, AstNode* passsp,
AstNode* assertBody(const AstNodeCoverOrAssert* nodep, AstNode* propp, AstNode* passsp,
AstNode* failsp) {
AstNode* bodyp = nullptr;
if (AstPExpr* const pexprp = VN_CAST(propp, PExpr)) {