diff --git a/lib/preprocessor.h b/lib/preprocessor.h index b8aad5e0916..267c9ca84e4 100644 --- a/lib/preprocessor.h +++ b/lib/preprocessor.h @@ -87,7 +87,7 @@ class CPPCHECKLIB WARN_UNUSED Preprocessor { /** character that is inserted in expanded macros */ static char macroChar; - explicit Preprocessor(const Settings& settings, ErrorLogger *errorLogger = nullptr); + explicit Preprocessor(const Settings& settings, ErrorLogger *errorLogger); virtual ~Preprocessor(); void inlineSuppressions(const simplecpp::TokenList &tokens, SuppressionList &suppressions); diff --git a/test/helpers.cpp b/test/helpers.cpp index a639d27ec42..0640bf14c50 100644 --- a/test/helpers.cpp +++ b/test/helpers.cpp @@ -162,7 +162,7 @@ void PreprocessorHelper::preprocess(const char code[], std::vector // Tokenizer.. tokenizer.list.createTokens(std::move(tokens2)); - const Preprocessor preprocessor(tokenizer.getSettings()); + const Preprocessor preprocessor(tokenizer.getSettings(), nullptr); std::list directives = preprocessor.createDirectives(tokens1); tokenizer.setDirectives(std::move(directives)); } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 091f4bef386..877e43847c5 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -6866,7 +6866,7 @@ class TestTokenizer : public TestFixture { "int PTR4 q4_var RBR4 = 0;\n"; // Preprocess file.. - Preprocessor preprocessor(settings0); + Preprocessor preprocessor(settings0, this); std::istringstream fin(raw_code); simplecpp::OutputList outputList; std::vector files;