Fix false CMPCONST/UNSIGNED warnings on inside, bug1581.

This commit is contained in:
Wilson Snyder
2019-11-02 16:56:37 -04:00
parent 25f08b29c6
commit 9ff5ef4ad5
4 changed files with 28 additions and 8 deletions
+2
View File
@@ -338,6 +338,8 @@ private:
AstNode* bp = AstLte::newTyped(itemp->fileline(),
cexprp->cloneTree(false),
irangep->rhsp()->unlinkFrBack());
ap->fileline()->modifyWarnOff(V3ErrorCode::UNSIGNED, true);
bp->fileline()->modifyWarnOff(V3ErrorCode::CMPCONST, true);
condp = new AstAnd(itemp->fileline(), ap, bp);
} else if (iconstp && iconstp->num().isFourState()
&& (nodep->casex() || nodep->casez() || nodep->caseInside())) {