simplecpp 1.9.0 - #8775
Draft
glankk wants to merge 5 commits into
Draft
Conversation
glankk
marked this pull request as ready for review
August 5, 2026 05:18
glankk
marked this pull request as draft
August 5, 2026 05:19
ludviggunne
reviewed
Aug 5, 2026
| simplecpp::OutputList outputList; | ||
| simplecpp::TokenList tokens(code,files,"test.c",&outputList); | ||
| simplecpp::DUI dui; | ||
| simplecpp::TokenList tokens(code,files,"test.c",dui,&outputList); |
Collaborator
There was a problem hiding this comment.
Let's just use {} for empty DUIs.
ludviggunne
reviewed
Aug 5, 2026
| const auto f = [&file, data, size, this](std::vector<std::string>& files, simplecpp::OutputList* outputList) { | ||
| simplecpp::DUI dui; | ||
| dui.std = mSettings.standards.getStdForLanguage(file.lang()); | ||
| return simplecpp::TokenList{{data, size}, files, file.spath(), dui, outputList}; |
Collaborator
There was a problem hiding this comment.
Maybe it would be good with some preprocessor tests for this. I.e. skip the trailing newline and run as both C and C++. And preferably something that tests both checkBuffer and checkFile, not sure in which scenarios these are called.
ludviggunne
reviewed
Aug 5, 2026
| */ | ||
| Macro(const std::string &name, const std::string &value, std::vector<std::string> &f) : nameTokDef(nullptr), files(f), tokenListDefine(f), valueDefinedInCode_(false) { | ||
| const std::string def(name + ' ' + value); | ||
| const std::string def(name + ' ' + value + '\n'); |
Collaborator
There was a problem hiding this comment.
Is there an issue that can be recreated with simplecpp only that exposes this?
Collaborator
Author
There was a problem hiding this comment.
There aren't really any symptoms because the Macro constructor just discards any warnings or errors from the tokenizer, but I think it's good to add this to prevent any future problems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.