mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 08:24:31 +02:00
Fix coverage of class methods (#3998).
This commit is contained in:
+4
-1
@@ -124,7 +124,10 @@ private:
|
||||
UINFO(9, "new " << declp << endl);
|
||||
|
||||
AstCoverInc* const incp = new AstCoverInc{fl, declp};
|
||||
if (!trace_var_name.empty() && v3Global.opt.traceCoverage()) {
|
||||
if (!trace_var_name.empty()
|
||||
&& v3Global.opt.traceCoverage()
|
||||
// No module handle to trace inside classes
|
||||
&& !VN_IS(m_modp, Class)) {
|
||||
FileLine* const fl_nowarn = new FileLine{incp->fileline()};
|
||||
fl_nowarn->modifyWarnOff(V3ErrorCode::UNUSEDSIGNAL, true);
|
||||
AstVar* const varp = new AstVar{fl_nowarn, VVarType::MODULETEMP, trace_var_name,
|
||||
|
||||
Reference in New Issue
Block a user