mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Fix error message continuations to avoid linenumber repetition
This commit is contained in:
+8
-1
@@ -247,6 +247,13 @@ void FileLine::v3errorEnd(std::ostringstream& str) {
|
||||
}
|
||||
|
||||
string FileLine::warnMore() const {
|
||||
if (m_lineno) {
|
||||
return V3Error::warnMore()+string(ascii().size(), ' ')+": ";
|
||||
} else {
|
||||
return V3Error::warnMore();
|
||||
}
|
||||
}
|
||||
string FileLine::warnOther() const {
|
||||
if (m_lineno) {
|
||||
return V3Error::warnMore()+ascii()+": ";
|
||||
} else {
|
||||
@@ -261,7 +268,7 @@ string FileLine::warnContext(bool secondary) const {
|
||||
if (!secondary) { // Avoid printing long paths on informational part of error
|
||||
for (FileLine* parentFl = parent(); parentFl; parentFl = parentFl->parent()) {
|
||||
if (parentFl->filenameIsGlobal()) break;
|
||||
out += parentFl->warnMore()+"... note: In file included from "
|
||||
out += parentFl->warnOther()+"... note: In file included from "
|
||||
+parentFl->filebasename()+"\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user