@@ -910,7 +910,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
910
910
std::vector<std::string> files;
911
911
simplecpp::TokenList tokens (*fileStream, files, file.spath ());
912
912
if (analyzerInformation) {
913
- const Preprocessor preprocessor (mSettings , mErrorLogger );
913
+ const Preprocessor preprocessor (mSettings , mErrorLogger , Standards::Language::C );
914
914
hash = calculateHash (preprocessor, tokens, mSettings , mSuppressions );
915
915
}
916
916
tokenizer.list .createTokens (std::move (tokens));
@@ -919,7 +919,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
919
919
std::vector<std::string> files;
920
920
simplecpp::TokenList tokens (file.spath (), files);
921
921
if (analyzerInformation) {
922
- const Preprocessor preprocessor (mSettings , mErrorLogger );
922
+ const Preprocessor preprocessor (mSettings , mErrorLogger , file. lang () );
923
923
hash = calculateHash (preprocessor, tokens, mSettings , mSuppressions );
924
924
}
925
925
tokenizer.list .createTokens (std::move (tokens));
@@ -964,9 +964,9 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
964
964
return mLogger ->exitcode ();
965
965
}
966
966
967
- Preprocessor preprocessor (mSettings , mErrorLogger );
967
+ Preprocessor preprocessor (mSettings , mErrorLogger , file. lang () );
968
968
969
- if (!preprocessor.loadFiles (tokens1, files, file. lang () ))
969
+ if (!preprocessor.loadFiles (tokens1, files))
970
970
return mLogger ->exitcode ();
971
971
972
972
if (!mSettings .plistOutput .empty ()) {
@@ -1032,7 +1032,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
1032
1032
1033
1033
if (mSettings .checkConfiguration ) {
1034
1034
for (const std::string &config : configurations)
1035
- (void )preprocessor.getcode (tokens1, config, files, file. lang (), true );
1035
+ (void )preprocessor.getcode (tokens1, config, files, true );
1036
1036
1037
1037
if (analyzerInformation)
1038
1038
mLogger ->setAnalyzerInfo (nullptr );
@@ -1105,7 +1105,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
1105
1105
if (mSettings .preprocessOnly ) {
1106
1106
std::string codeWithoutCfg;
1107
1107
Timer::run (" Preprocessor::getcode" , mSettings .showtime , &s_timerResults, [&]() {
1108
- codeWithoutCfg = preprocessor.getcode (tokens1, mCurrentConfig , files, file. lang (), true );
1108
+ codeWithoutCfg = preprocessor.getcode (tokens1, mCurrentConfig , files, true );
1109
1109
});
1110
1110
1111
1111
if (startsWith (codeWithoutCfg," #file" ))
@@ -1131,7 +1131,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
1131
1131
try {
1132
1132
// Create tokens, skip rest of iteration if failed
1133
1133
Timer::run (" Tokenizer::createTokens" , mSettings .showtime , &s_timerResults, [&]() {
1134
- simplecpp::TokenList tokensP = preprocessor.preprocess (tokens1, mCurrentConfig , files, file. lang (), true );
1134
+ simplecpp::TokenList tokensP = preprocessor.preprocess (tokens1, mCurrentConfig , files, true );
1135
1135
tokenizer.list .createTokens (std::move (tokensP));
1136
1136
});
1137
1137
hasValidConfig = true ;
0 commit comments