mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Strengthen AstNode types to AstNodeExpr
Declare every AstNode children and variables as AstNodeExpr where we statically know this is the appropriate sub-type.
This commit is contained in:
+2
-3
@@ -152,7 +152,7 @@ void V3CCtors::evalAsserts() {
|
||||
AstVarRef* const vrefp
|
||||
= new AstVarRef{varp->fileline(), varp, VAccess::READ};
|
||||
vrefp->selfPointer("this");
|
||||
AstNode* newp = vrefp;
|
||||
AstNodeExpr* newp = vrefp;
|
||||
if (varp->isWide()) {
|
||||
newp = new AstWordSel{
|
||||
varp->fileline(), newp,
|
||||
@@ -167,8 +167,7 @@ void V3CCtors::evalAsserts() {
|
||||
new AstCStmt{varp->fileline(), "Verilated::overWidthError(\""
|
||||
+ varp->prettyName() + "\");"}};
|
||||
ifp->branchPred(VBranchPred::BP_UNLIKELY);
|
||||
newp = ifp;
|
||||
funcp->addStmtsp(newp);
|
||||
funcp->addStmtsp(ifp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user