Fix #14809 FP syntaxError for typedef involving std::size_t#8618
Open
chrchr-github wants to merge 3 commits into
Open
Fix #14809 FP syntaxError for typedef involving std::size_t#8618chrchr-github wants to merge 3 commits into
chrchr-github wants to merge 3 commits into
Conversation
danmar
reviewed
Jun 17, 2026
| @@ -1488,8 +1487,6 @@ class TestToken : public TestFixture { | |||
| TokenList list_c{settingsDefault, Standards::Language::C}; | |||
| auto tokensFrontBack = std::make_shared<TokensFrontBack>(); | |||
| Token tok(list_c, std::move(tokensFrontBack)); | |||
| tok.str("size_t"); // not treated as keyword in TokenList::isKeyword() | |||
Collaborator
There was a problem hiding this comment.
there is no assertion so this whole block of code seems redundant now. but would it be a good idea to keep the assertion and ensure that std is false instead?
Collaborator
Author
There was a problem hiding this comment.
size_t will be simplified, so testing the token's properties has no purpose. I'll remove the code blocks.
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.
size_tis a platform type and will be simplified anyway, this is tested here:cppcheck/test/testtokenize.cpp
Line 9012 in e1053db