mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Refactor some V3Error code handling and add tests. No functional change intended.
This commit is contained in:
+3
-2
@@ -301,8 +301,9 @@ void V3ErrorGuarded::v3errorEndGuts(const std::ostringstream& sstr, const string
|
||||
|
||||
void V3Error::init() {
|
||||
for (int i = 0; i < V3ErrorCode::_ENUM_MAX; i++) {
|
||||
describedEachWarn(static_cast<V3ErrorCode>(i), false);
|
||||
pretendError(static_cast<V3ErrorCode>(i), V3ErrorCode{i}.pretendError());
|
||||
const V3ErrorCode code{i};
|
||||
describedEachWarn(code, false);
|
||||
pretendError(code, code.pretendError());
|
||||
}
|
||||
// Not an UASSERT as failure would call V3Error and it's broken due to this
|
||||
assert(std::string{V3ErrorCode{V3ErrorCode::_ENUM_MAX}.ascii()} == " MAX");
|
||||
|
||||
Reference in New Issue
Block a user