@@ -859,7 +859,7 @@ static simplecpp::TokenList createTokenList(const std::string& filename, std::ve
859859 return {filename, files, outputList};
860860}
861861
862- std::size_t CppCheck::calculateHash (const Preprocessor& preprocessor, const simplecpp::TokenList& tokens) const
862+ std::size_t CppCheck::calculateHash (const Preprocessor& preprocessor, const simplecpp::TokenList& tokens, const std::string& filePath ) const
863863{
864864 std::ostringstream toolinfo;
865865 toolinfo << (mSettings .cppcheckCfgProductName .empty () ? CPPCHECK_VERSION_STRING : mSettings .cppcheckCfgProductName );
@@ -876,7 +876,7 @@ std::size_t CppCheck::calculateHash(const Preprocessor& preprocessor, const simp
876876 }
877877 toolinfo << mSettings .premiumArgs ;
878878 // TODO: do we need to add more options?
879- mSuppressions .nomsg .dump (toolinfo);
879+ mSuppressions .nomsg .dump (toolinfo, filePath );
880880 return preprocessor.calculateHash (tokens, toolinfo.str ());
881881}
882882
@@ -1029,7 +1029,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
10291029
10301030 if (analyzerInformation) {
10311031 // Calculate hash so it can be compared with old hash / future hashes
1032- const std::size_t hash = calculateHash (preprocessor, tokens1);
1032+ const std::size_t hash = calculateHash (preprocessor, tokens1, file. spath () );
10331033 std::list<ErrorMessage> errors;
10341034 if (!analyzerInformation->analyzeFile (mSettings .buildDir , file.spath (), cfgname, fileIndex, hash, errors)) {
10351035 while (!errors.empty ()) {
0 commit comments