Fix coverage of class methods (#3998).

This commit is contained in:
Wilson Snyder
2023-03-03 19:26:15 -05:00
parent 12728bc478
commit ab502c5196
10 changed files with 463 additions and 381 deletions
+5
View File
@@ -156,6 +156,11 @@ private:
// m_toScopeMoves.push_back(std::make_pair(nodep, m_classScopep));
//}
}
void visit(AstCoverDecl* nodep) override {
// Need to declare coverage in package, where we have access to symbol table
iterateChildren(nodep);
if (m_classPackagep) m_classPackagep->addStmtsp(nodep->unlinkFrBack());
}
void visit(AstInitial* nodep) override {
// But not AstInitialAutomatic, which remains under the class
iterateChildren(nodep);