Internals: Rename addIgnoreMatch. No functional change.

This commit is contained in:
Wilson Snyder 2023-10-08 01:02:23 -04:00
parent 1d3d59243c
commit 7f38414276
4 changed files with 15 additions and 14 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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) {
$<fl>1->v3error("Argument -scope only supported for tracing_on/off");
@ -7232,16 +7232,16 @@ vltItem:
{ if (($1 == V3ErrorCode::I_COVERAGE) || ($1 == V3ErrorCode::I_TRACING)) {
$<fl>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) {
$<fl>1->v3error("Argument -scope only supported for tracing_on/off");