@@ -307,7 +307,7 @@ void Preprocessor::inlineSuppressions(SuppressionList &suppressions)
307307 ::addInlineSuppressions (filedata->tokens, mSettings , suppressions, err);
308308 }
309309 for (const BadInlineSuppression &bad : err) {
310- error (bad.file , bad.line , bad.col , bad.errmsg , simplecpp::Output::ERROR ); // TODO: use individual (non-fatal) ID
310+ invalidSuppression (bad.file , bad.line , bad.col , bad.errmsg ); // TODO: column is always 0
311311 }
312312}
313313
@@ -956,6 +956,11 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line
956956 mErrorLogger .reportErr (errmsg);
957957}
958958
959+ void Preprocessor::invalidSuppression (const std::string &filename, unsigned int linenr, unsigned int col, const std::string &msg)
960+ {
961+ error (filename, linenr, col, msg, " invalidSuppression" );
962+ }
963+
959964void Preprocessor::getErrorMessages (ErrorLogger &errorLogger, const Settings &settings)
960965{
961966 std::vector<std::string> files;
@@ -968,6 +973,7 @@ void Preprocessor::getErrorMessages(ErrorLogger &errorLogger, const Settings &se
968973 preprocessor.error (" " , 1 , 2 , " message" , simplecpp::Output::UNHANDLED_CHAR_ERROR);
969974 preprocessor.error (" " , 1 , 2 , " message" , simplecpp::Output::INCLUDE_NESTED_TOO_DEEPLY);
970975 preprocessor.error (" " , 1 , 2 , " message" , simplecpp::Output::FILE_NOT_FOUND);
976+ preprocessor.invalidSuppression (" " , 1 , 2 , " message" );
971977}
972978
973979void Preprocessor::dump (std::ostream &out) const
0 commit comments