Fix --skip-identical skipping on some errors (#6066).

This commit is contained in:
Wilson Snyder
2025-06-06 17:18:02 -04:00
parent db03b95389
commit 54e637c72b
4 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -349,13 +349,14 @@ string V3Error::stripMetaText(const string& text, bool stripContext) VL_PURE {
}
void V3Error::abortIfWarnings() {
if (!isErrorOrWarn()) return;
const bool exwarn = warnFatal() && warnCount();
if (errorCount() && exwarn) {
v3fatalMany("Exiting due to " << std::dec << V3Error::s().errorCount() << " error(s), " //
<< V3Error::s().warnCount() << " warning(s)\n");
} else if (errorCount()) {
v3fatalMany("Exiting due to " << std::dec << V3Error::s().errorCount() << " error(s)\n");
} else if (exwarn) {
} else {
v3fatalMany("Exiting due to " << std::dec << V3Error::s().warnCount() << " warning(s)\n");
}
}