From 7f38414276e359c768351e1a2e293fd845eb44f1 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 8 Oct 2023 01:02:23 -0400 Subject: [PATCH] Internals: Rename addIgnoreMatch. No functional change. --- docs/guide/warnings.rst | 7 ++++--- src/V3Config.cpp | 10 +++++----- src/V3Config.h | 2 +- src/verilog.y | 10 +++++----- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/guide/warnings.rst b/docs/guide/warnings.rst index b7cf29a81..48c0888f9 100644 --- a/docs/guide/warnings.rst +++ b/docs/guide/warnings.rst @@ -2046,17 +2046,18 @@ List Of Warnings .. include:: ../../docs/gen/ex_WIDTHEXPAND_1_fixed.rst + .. option:: WIDTHTRUNC - A more granular WIDTH warning, for when a value is truncated + A more granular WIDTH warning, for when a value is truncated. .. option:: WIDTHEXPAND - A more granular WIDTH warning, for when a value is zero expanded + A more granular WIDTH warning, for when a value is zero expanded. .. option:: WIDTHXZEXPAND - A more granular WIDTH warning, for when a value is X/Z expanded + A more granular WIDTH warning, for when a value is X/Z expanded. .. option:: WIDTHCONCAT diff --git a/src/V3Config.cpp b/src/V3Config.cpp index de968acab..a221f92e8 100644 --- a/src/V3Config.cpp +++ b/src/V3Config.cpp @@ -303,7 +303,7 @@ public: m_ignLines.insert(V3ConfigIgnoresLine{code, lineno, on}); m_lastIgnore.it = m_ignLines.begin(); } - void addWaiver(V3ErrorCode code, const string& match) { + void addIgnoreMatch(V3ErrorCode code, const string& match) { m_waivers.push_back(std::make_pair(code, match)); } @@ -518,6 +518,10 @@ void V3Config::addIgnore(V3ErrorCode code, bool on, const string& filename, int } } +void V3Config::addIgnoreMatch(V3ErrorCode code, const string& filename, const string& match) { + V3ConfigResolver::s().files().at(filename).addIgnoreMatch(code, match); +} + void V3Config::addInline(FileLine* fl, const string& module, const string& ftask, bool on) { if (ftask.empty()) { V3ConfigResolver::s().modules().at(module).setInline(on); @@ -590,10 +594,6 @@ void V3Config::addVarAttr(FileLine* fl, const string& module, const string& ftas } } -void V3Config::addWaiver(V3ErrorCode code, const string& filename, const string& match) { - V3ConfigResolver::s().files().at(filename).addWaiver(code, match); -} - void V3Config::applyCase(AstCase* nodep) { const string& filename = nodep->fileline()->filename(); V3ConfigFile* filep = V3ConfigResolver::s().files().resolve(filename); diff --git a/src/V3Config.h b/src/V3Config.h index bee0ea59e..6b49a0997 100644 --- a/src/V3Config.h +++ b/src/V3Config.h @@ -34,6 +34,7 @@ public: static void addCoverageBlockOff(const string& file, int lineno); static void addCoverageBlockOff(const string& module, const string& blockname); static void addIgnore(V3ErrorCode code, bool on, const string& filename, int min, int max); + static void addIgnoreMatch(V3ErrorCode code, const string& filename, const string& match); static void addInline(FileLine* fl, const string& module, const string& ftask, bool on); static void addModulePragma(const string& module, VPragmaType pragma); static void addProfileData(FileLine* fl, const string& model, const string& key, @@ -41,7 +42,6 @@ public: static void addScopeTraceOn(bool on, const string& scope, int levels); static void addVarAttr(FileLine* fl, const string& module, const string& ftask, const string& signal, VAttrType type, AstSenTree* nodep); - static void addWaiver(V3ErrorCode code, const string& filename, const string& match); static void applyCase(AstCase* nodep); static void applyCoverageBlock(AstNodeModule* modulep, AstBegin* nodep); diff --git a/src/verilog.y b/src/verilog.y index fd0c18ca9..31581e891 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -7213,9 +7213,9 @@ vltItem: | vltOffFront yVLT_D_FILE yaSTRING { V3Config::addIgnore($1, false, *$3, 0, 0); } | vltOffFront yVLT_D_FILE yaSTRING yVLT_D_LINES yaINTNUM - { V3Config::addIgnore($1, false, *$3, $5->toUInt(), $5->toUInt()+1); } + { V3Config::addIgnore($1, false, *$3, $5->toUInt(), $5->toUInt() + 1); } | vltOffFront yVLT_D_FILE yaSTRING yVLT_D_LINES yaINTNUM '-' yaINTNUM - { V3Config::addIgnore($1, false, *$3, $5->toUInt(), $7->toUInt()+1); } + { V3Config::addIgnore($1, false, *$3, $5->toUInt(), $7->toUInt() + 1); } | vltOffFront yVLT_D_SCOPE yaSTRING { if ($1 != V3ErrorCode::I_TRACING) { $1->v3error("Argument -scope only supported for tracing_on/off"); @@ -7232,16 +7232,16 @@ vltItem: { if (($1 == V3ErrorCode::I_COVERAGE) || ($1 == V3ErrorCode::I_TRACING)) { $1->v3error("Argument -match only supported for lint_off"); } else { - V3Config::addWaiver($1, *$3, *$5); + V3Config::addIgnoreMatch($1, *$3, *$5); }} | vltOnFront { V3Config::addIgnore($1, true, "*", 0, 0); } | vltOnFront yVLT_D_FILE yaSTRING { V3Config::addIgnore($1, true, *$3, 0, 0); } | vltOnFront yVLT_D_FILE yaSTRING yVLT_D_LINES yaINTNUM - { V3Config::addIgnore($1, true, *$3, $5->toUInt(), $5->toUInt()+1); } + { V3Config::addIgnore($1, true, *$3, $5->toUInt(), $5->toUInt() + 1); } | vltOnFront yVLT_D_FILE yaSTRING yVLT_D_LINES yaINTNUM '-' yaINTNUM - { V3Config::addIgnore($1, true, *$3, $5->toUInt(), $7->toUInt()+1); } + { V3Config::addIgnore($1, true, *$3, $5->toUInt(), $7->toUInt() + 1); } | vltOnFront yVLT_D_SCOPE yaSTRING { if ($1 != V3ErrorCode::I_TRACING) { $1->v3error("Argument -scope only supported for tracing_on/off");