mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 10:33:13 +02:00
Fix function calls in with statements (#4245)
This commit is contained in:
@@ -1371,6 +1371,15 @@ private:
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
}
|
||||
void visit(AstWith* nodep) override {
|
||||
if (nodep->user1SetOnce()) {
|
||||
// Make sure that the return expression is converted only once
|
||||
return;
|
||||
}
|
||||
AstNodeExpr* const withExprp = VN_AS(nodep->exprp()->unlinkFrBack(), NodeExpr);
|
||||
nodep->addExprp(new AstCReturn{withExprp->fileline(), withExprp});
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstScope* nodep) override {
|
||||
m_scopep = nodep;
|
||||
m_insStmtp = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user