@@ -385,36 +385,14 @@ bool CppCheckExecutor::reportUnmatchedSuppressions(const Settings &settings, con
385385
386386 bool err = false ;
387387
388- for (auto i = files.cbegin (); i != files.cend (); ++i) {
389- const std::vector<ErrorMessage> errors = getUnmatchedSuppressions (supprlist.getUnmatchedLocalSuppressions (*i), settings.unmatchedSuppressionFilters );
390- err |= reportErrorsFn (i->spath (), i->fsFileId (), errors);
391- }
392-
393- for (auto i = fileSettings.cbegin (); i != fileSettings.cend (); ++i) {
394- const std::vector<ErrorMessage> errors = getUnmatchedSuppressions (supprlist.getUnmatchedLocalSuppressions (i->file ), settings.unmatchedSuppressionFilters );
395- err |= reportErrorsFn (i->file .spath (), i->file .fsFileId (), errors);
396- }
397-
398- if (settings.inlineSuppressions ) {
399- const std::vector<ErrorMessage> errors = getUnmatchedSuppressions (supprlist.getUnmatchedInlineSuppressions (), settings.unmatchedSuppressionFilters );
400- for (const auto & errmsg : errors) {
401- std::string sourcefile;
402- if (!errmsg.callStack .empty ())
403- sourcefile = errmsg.callStack .cbegin ()->getfile (false ); // TODO: simplify path?
404- err |= reportErrorsFn (sourcefile, 0 , {errmsg});
405- }
406- }
407-
408- const std::vector<ErrorMessage> errors = getUnmatchedSuppressions (supprlist.getUnmatchedGlobalSuppressions (), settings.unmatchedSuppressionFilters );
388+ const std::vector<ErrorMessage> errors = getUnmatchedSuppressions (supprlist.getUnmatchedSuppressions (), settings.unmatchedSuppressionFilters );
409389 for (const auto & errmsg : errors) {
410390 std::string sourcefile;
411391 if (!errmsg.callStack .empty ())
412392 sourcefile = errmsg.callStack .cbegin ()->getfile (false ); // TODO: simplify path?
413393 err |= reportErrorsFn (sourcefile, 0 , {errmsg});
414394 }
415395
416- // TODO: report unmatched suppressions for included files
417-
418396 return err;
419397}
420398
0 commit comments