Debug: Show only first line of suppressed warnings
This commit is contained in:
parent
c514bb26e8
commit
abc0eb92a0
|
|
@ -170,6 +170,14 @@ void V3Error::v3errorEnd(std::ostringstream& sstr) {
|
||||||
// On debug, show only non default-off warning to prevent pages of warnings
|
// On debug, show only non default-off warning to prevent pages of warnings
|
||||||
&& (!debug() || s_errorCode.defaultsOff())) return;
|
&& (!debug() || s_errorCode.defaultsOff())) return;
|
||||||
string msg = msgPrefix()+sstr.str();
|
string msg = msgPrefix()+sstr.str();
|
||||||
|
if (s_errorSuppressed) { // If suppressed print only first line to reduce verbosity
|
||||||
|
string::size_type pos;
|
||||||
|
if ((pos = msg.find('\n')) != string::npos) {
|
||||||
|
msg.erase(pos, msg.length()-pos);
|
||||||
|
msg += "...";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Trailing newline
|
||||||
if (msg[msg.length()-1] != '\n') msg += '\n';
|
if (msg[msg.length()-1] != '\n') msg += '\n';
|
||||||
// Suppress duplicates
|
// Suppress duplicates
|
||||||
if (s_messages.find(msg) != s_messages.end()) return;
|
if (s_messages.find(msg) != s_messages.end()) return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue