Fix some errors reporting wrong objects.

This commit is contained in:
Wilson Snyder
2019-07-14 12:21:39 -04:00
parent 173efbc829
commit cbb9288cb1
12 changed files with 36 additions and 26 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ private:
itemp; itemp=VN_CAST(itemp->nextp(), CaseItem)) {
if (itemp->isDefault()) {
if (hitDefault) {
nodep->v3error("Multiple default statements in case statement.");
itemp->v3error("Multiple default statements in case statement.");
}
hitDefault = true;
}
@@ -186,8 +186,8 @@ private:
if (!m_valueItem[i]) {
m_valueItem[i] = itemp;
} else if (!itemp->ignoreOverlap() && !bitched) {
itemp->v3warn(CASEOVERLAP, "Case values overlap (example pattern 0x"
<<std::hex<<i<<")");
icondp->v3warn(CASEOVERLAP, "Case values overlap (example pattern 0x"
<<std::hex<<i<<")");
bitched = true;
m_caseNoOverlapsAllCovered = false;
}