Skip to content

Commit

Permalink
Preprocessor: made errorlogger mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Apr 11, 2024
1 parent 423617a commit 41966cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/preprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void PreprocessorHelper::preprocess(const char code[], std::vector<std::string>
// Tokenizer..
tokenizer.list.createTokens(std::move(tokens2));

const Preprocessor preprocessor(tokenizer.getSettings());
const Preprocessor preprocessor(tokenizer.getSettings(), nullptr);
std::list<Directive> directives = preprocessor.createDirectives(tokens1);
tokenizer.setDirectives(std::move(directives));
}
2 changes: 1 addition & 1 deletion test/testtokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> files;
Expand Down

0 comments on commit 41966cc

Please sign in to comment.