mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Support pre/postifx incrementation/decrementation in array index (#2223)
This commit is contained in:
@@ -215,6 +215,21 @@ private:
|
||||
}
|
||||
m_setRefLvalue = last_setRefLvalue;
|
||||
}
|
||||
void prepost_visit(AstNodeTriop* nodep) {
|
||||
bool last_setRefLvalue = m_setRefLvalue;
|
||||
{
|
||||
m_setRefLvalue = false;
|
||||
iterateAndNextNull(nodep->lhsp());
|
||||
iterateAndNextNull(nodep->rhsp());
|
||||
m_setRefLvalue = true;
|
||||
iterateAndNextNull(nodep->thsp());
|
||||
}
|
||||
m_setRefLvalue = last_setRefLvalue;
|
||||
}
|
||||
virtual void visit(AstPreAdd* nodep) VL_OVERRIDE { prepost_visit(nodep); }
|
||||
virtual void visit(AstPostAdd* nodep) VL_OVERRIDE { prepost_visit(nodep); }
|
||||
virtual void visit(AstPreSub* nodep) VL_OVERRIDE { prepost_visit(nodep); }
|
||||
virtual void visit(AstPostSub* nodep) VL_OVERRIDE { prepost_visit(nodep); }
|
||||
|
||||
// Nodes that change LValue state
|
||||
virtual void visit(AstSel* nodep) VL_OVERRIDE {
|
||||
|
||||
Reference in New Issue
Block a user