void FileLine::modifyStateInherit(const FileLine* fromp) { // Any warnings that are off in "from", become off in "this". for (int codei=V3ErrorCode::EC_MIN; codei<V3ErrorCode::_ENUM_MAX; codei++) { V3ErrorCode code = (V3ErrorCode)codei; if (fromp->warnIsOff(code)) { warnOff(code, true); } } }
bool FileLine::warnOff(const string& msg, bool flag) { V3ErrorCode code (msg.c_str()); if (code < V3ErrorCode::EC_FIRST_WARN) { return false; } else if (v3Global.opt.lintOnly() // Lint mode is allowed to suppress some errors && code < V3ErrorCode::EC_MIN) { return false; } else { warnOff(code, flag); return true; } }
void FileLine::warnStyleOff(bool flag) { for (int codei=V3ErrorCode::EC_MIN; codei<V3ErrorCode::_ENUM_MAX; codei++) { V3ErrorCode code = (V3ErrorCode)codei; if (code.styleError()) warnOff(code, flag); } }