Repository navigation
Test the simplecpp portability reports and the macro usage arg in the dump - #4
Closed
JayToltTech wants to merge 1 commit into
Closed
JayToltTech wants to merge 1 commit into
JayToltTech wants to merge 1 commit into
Conversation
JayToltTech
force-pushed
the
test-15239-portability
branch
from
November 21, 2026 22:09
23552e0 to
754456f
Compare
… dump The simplecpp update reports PORTABILITY_BACKSLASH and PORTABILITY_NO_EOF_NEWLINE as portability messages and writes the argument of an integer constant macro call to <macro-usage>, with no test for either. portabilityReports checks both ids are reported with portability enabled and nothing without it. dumpMacroUsageArg checks arg= is written for INT64_C(5) and left out for other macros. getcode() now calls reportSimplecppPortability() after removeComments(), as CppCheck::checkInternal does, so the main file's portability messages reach the test logger.
JayToltTech
force-pushed
the
test-15239-portability
branch
from
November 21, 2026 22:09
754456f to
fe89cd1
Compare
Author
|
cppcheck-opensource#9048 merged without these tests, so they're now a PR against main: cppcheck-opensource#9057. |
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.
Tests for cppcheck-opensource#9048, re the "Tests may be missing" note there. Two things that PR adds had no test.
portabilityReportschecks that the backslash-space-newline and no-EOF-newline cases come out assimplecppPortabilityBackslashandsimplecppPortabilityNoEofNewlinewith portability enabled, and that nothing is reported without it.dumpMacroUsageArgchecks that<macro-usage>getsarg="5"forINT64_C(5)and noargfor an ordinary function-like macro.One commit on top of 69895d9. TestPreprocessor and TestSuppressions pass on macOS arm64 with
-Werror, andrunformatwith uncrustify 0.80.1 makes no changes.