Skip to content

Fix #11437 FP knownConditionTrueFalse when comparing clamped value#8751

Open
chrchr-github wants to merge 4 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_11437
Open

Fix #11437 FP knownConditionTrueFalse when comparing clamped value#8751
chrchr-github wants to merge 4 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_11437

Conversation

@chrchr-github

Copy link
Copy Markdown
Collaborator

No description provided.

@chrchr-github
chrchr-github marked this pull request as ready for review July 23, 2026 20:56
Comment thread test/testvalueflow.cpp
" int x = a < b ? a : b;\n"
" return x;\n"
"}\n";
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", 1));

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values apparently give no benefit. Does this test assert that x cannot be a+1? Thaf is incorrect for a=1, b=2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant