Fix ++/-- tree fix in case statements (#3346) (#3349).

This commit is contained in:
Drew Ranck
2022-03-12 11:24:32 -05:00
committed by GitHub
parent b5ce7d5982
commit 90fb2e5487
6 changed files with 266 additions and 0 deletions
+10
View File
@@ -134,6 +134,16 @@ private:
iterateAndNextNull(nodep->elsesp());
m_insStmtp = nullptr;
}
virtual void visit(AstCaseItem* nodep) override {
m_insMode = IM_BEFORE;
{
VL_RESTORER(m_unsupportedHere);
m_unsupportedHere = true;
iterateAndNextNull(nodep->condsp());
}
m_insStmtp = nullptr; // Next thing should be new statement
iterateAndNextNull(nodep->bodysp());
}
virtual void visit(AstNodeFor* nodep) override { // LCOV_EXCL_LINE
nodep->v3fatalSrc(
"For statements should have been converted to while statements in V3Begin.cpp");