diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 738862e42eb..4ad0aea66ff 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -952,13 +952,17 @@ std::size_t Preprocessor::calculateHash(const simplecpp::TokenList &tokens1, con { std::string hashData = toolinfo; for (const simplecpp::Token *tok = tokens1.cfront(); tok; tok = tok->next) { - if (!tok->comment) + if (!tok->comment) { hashData += tok->str(); + hashData += tok->location.line / tok->location.col; + } } for (std::map::const_iterator it = mTokenLists.cbegin(); it != mTokenLists.cend(); ++it) { for (const simplecpp::Token *tok = it->second->cfront(); tok; tok = tok->next) { - if (!tok->comment) + if (!tok->comment) { hashData += tok->str(); + hashData += tok->location.line / tok->location.col; + } } } return (std::hash{})(hashData);