@@ -850,24 +850,24 @@ static simplecpp::TokenList createTokenList(const std::string& filename, std::ve
850850 return {filename, files, outputList};
851851}
852852
853- static std::size_t calculateHash (const Preprocessor& preprocessor, const simplecpp::TokenList& tokens, const Settings& settings, const Suppressions& supprs )
853+ std::size_t CppCheck:: calculateHash (const Preprocessor& preprocessor, const simplecpp::TokenList& tokens)
854854{
855855 std::ostringstream toolinfo;
856- toolinfo << (settings .cppcheckCfgProductName .empty () ? CPPCHECK_VERSION_STRING : settings .cppcheckCfgProductName );
857- toolinfo << (settings .severity .isEnabled (Severity::warning) ? ' w' : ' ' );
858- toolinfo << (settings .severity .isEnabled (Severity::style) ? ' s' : ' ' );
859- toolinfo << (settings .severity .isEnabled (Severity::performance) ? ' p' : ' ' );
860- toolinfo << (settings .severity .isEnabled (Severity::portability) ? ' p' : ' ' );
861- toolinfo << (settings .severity .isEnabled (Severity::information) ? ' i' : ' ' );
862- toolinfo << settings .userDefines ;
863- toolinfo << std::to_string (static_cast <std::uint8_t >(settings .checkLevel ));
864- for (const auto &a : settings .addonInfos ) {
856+ toolinfo << (mSettings .cppcheckCfgProductName .empty () ? CPPCHECK_VERSION_STRING : mSettings .cppcheckCfgProductName );
857+ toolinfo << (mSettings .severity .isEnabled (Severity::warning) ? ' w' : ' ' );
858+ toolinfo << (mSettings .severity .isEnabled (Severity::style) ? ' s' : ' ' );
859+ toolinfo << (mSettings .severity .isEnabled (Severity::performance) ? ' p' : ' ' );
860+ toolinfo << (mSettings .severity .isEnabled (Severity::portability) ? ' p' : ' ' );
861+ toolinfo << (mSettings .severity .isEnabled (Severity::information) ? ' i' : ' ' );
862+ toolinfo << mSettings .userDefines ;
863+ toolinfo << std::to_string (static_cast <std::uint8_t >(mSettings .checkLevel ));
864+ for (const auto &a : mSettings .addonInfos ) {
865865 toolinfo << a.name ;
866866 toolinfo << a.args ;
867867 }
868- toolinfo << settings .premiumArgs ;
868+ toolinfo << mSettings .premiumArgs ;
869869 // TODO: do we need to add more options?
870- supprs .nomsg .dump (toolinfo);
870+ mSuppressions .nomsg .dump (toolinfo);
871871 return preprocessor.calculateHash (tokens, toolinfo.str ());
872872}
873873
@@ -927,7 +927,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
927927 simplecpp::TokenList tokens (*fileStream, files, file.spath ());
928928 if (analyzerInformation) {
929929 const Preprocessor preprocessor (mSettings , mErrorLogger , Standards::Language::C);
930- hash = calculateHash (preprocessor, tokens, mSettings , mSuppressions );
930+ hash = calculateHash (preprocessor, tokens);
931931 }
932932 tokenlist.createTokens (std::move (tokens));
933933 }
@@ -936,7 +936,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
936936 simplecpp::TokenList tokens (file.spath (), files);
937937 if (analyzerInformation) {
938938 const Preprocessor preprocessor (mSettings , mErrorLogger , file.lang ());
939- hash = calculateHash (preprocessor, tokens, mSettings , mSuppressions );
939+ hash = calculateHash (preprocessor, tokens);
940940 }
941941 tokenlist.createTokens (std::move (tokens));
942942 }
@@ -1020,7 +1020,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
10201020
10211021 if (analyzerInformation) {
10221022 // Calculate hash so it can be compared with old hash / future hashes
1023- const std::size_t hash = calculateHash (preprocessor, tokens1, mSettings , mSuppressions );
1023+ const std::size_t hash = calculateHash (preprocessor, tokens1);
10241024 std::list<ErrorMessage> errors;
10251025 if (!analyzerInformation->analyzeFile (mSettings .buildDir , file.spath (), cfgname, fileIndex, hash, errors)) {
10261026 while (!errors.empty ()) {
0 commit comments