mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 02:23:19 +02:00
Simplify and clarify reporting of enclosing instance
Rename AstNodeModule::hierName -> someInstanceName and explain that this is only used for user messages. Rename AstNode::locationStr -> instanceStr and simplify implementation. In particular, do not report an instance if we can't find a reasonable guess.
This commit is contained in:
+3
-3
@@ -340,15 +340,15 @@ void FileLine::modifyStateInherit(const FileLine* fromp) {
|
||||
}
|
||||
}
|
||||
|
||||
void FileLine::v3errorEnd(std::ostringstream& sstr, const string& locationStr) {
|
||||
void FileLine::v3errorEnd(std::ostringstream& sstr, const string& extra) {
|
||||
std::ostringstream nsstr;
|
||||
if (lastLineno()) nsstr << this;
|
||||
nsstr << sstr.str();
|
||||
nsstr << endl;
|
||||
std::ostringstream lstr;
|
||||
if (!locationStr.empty()) {
|
||||
if (!extra.empty()) {
|
||||
lstr << std::setw(ascii().length()) << " "
|
||||
<< ": " << locationStr;
|
||||
<< ": " << extra;
|
||||
}
|
||||
m_waive = V3Config::waive(this, V3Error::errorCode(), sstr.str());
|
||||
if (warnIsOff(V3Error::errorCode()) || m_waive) {
|
||||
|
||||
Reference in New Issue
Block a user