When warnings are disabled on signals that are flattened out, disable

the warnings on the signal(s) that replace it.
This commit is contained in:
Wilson Snyder
2008-08-01 15:30:17 -04:00
parent 74ca9578ed
commit 043ad86482
11 changed files with 100 additions and 5 deletions
+11 -1
View File
@@ -153,13 +153,23 @@ ostream& operator<<(ostream& os, FileLine* fileline) {
return(os);
}
bool FileLine::warnIsOff(V3ErrorCode code) {
bool FileLine::warnIsOff(V3ErrorCode code) const {
if (m_warnOff.test(code)) return true;
// UNOPTFLAT implies UNOPT
if (code==V3ErrorCode::UNOPT && m_warnOff.test(V3ErrorCode::UNOPTFLAT)) return true;
return false;
}
void FileLine::warnStateInherit(const FileLine& from) {
// Any warnings that are off in "from", become off in "this".
for (int codei=V3ErrorCode::FIRST_WARN; codei<V3ErrorCode::MAX; codei++) {
V3ErrorCode code = (V3ErrorCode)codei;
if (from.warnIsOff(code)) {
this->warnOff(code, true);
}
}
}
void FileLine::v3errorEnd(ostringstream& str) {
if (this && m_lineno) {
ostringstream nsstr;