Add ternary operator into branch coverage (#5880)

This commit is contained in:
Ryszard Rozak
2025-05-19 09:35:35 -04:00
committed by GitHub
parent ad08302e5f
commit bed0456eca
13 changed files with 1907 additions and 644 deletions
+12
View File
@@ -1117,6 +1117,18 @@ class TristateVisitor final : public TristateBaseVisitor {
}
}
void visit(AstExprStmt* nodep) override {
iterateChildren(nodep);
if (m_graphing) {
UASSERT_OBJ(!m_alhs, nodep, "AstExprStmt node on the LHS of assignment");
associateLogic(nodep->resultp(), nodep);
} else if (nodep->resultp()->user1p()) {
nodep->user1p(getEnp(nodep->resultp()));
nodep->resultp()->user1p(nullptr);
m_tgraph.didProcess(nodep);
}
}
void visit(AstSel* nodep) override {
if (m_graphing) {
iterateChildren(nodep);