Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #12039 FP knownConditionTrueFalse #5513

Merged
merged 6 commits into from
Oct 6, 2023

Conversation

chrchr-github
Copy link
Collaborator

No description provided.

@firewave
Copy link
Collaborator

firewave commented Oct 5, 2023

If the last commit in a PR s flagged as "skip ci" the PR is not build and it won't show the checks even if a previous build/push/version was successful.

Copy link
Owner

@danmar danmar left a comment

Choose a reason for hiding this comment

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

lgtm

@chrchr-github
Copy link
Collaborator Author

Does it make sense to turn a symbolic value into a bound value? @pfultz2

@pfultz2
Copy link
Contributor

pfultz2 commented Oct 5, 2023

Does it make sense to turn a symbolic value into a bound value?

I think so, we create symbolic bound values for conditions like x < y already.

@@ -1858,6 +1858,7 @@ static void valueFlowImpossibleValues(TokenList& tokenList, const Settings* sett
for (const Token* tok2 : tokens) {
if (tok2->hasKnownIntValue()) {
values.emplace_back();
values.back().intvalue = tok2->getKnownIntValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make more sense to just do values.push_pack(tok2->values().front())?

@chrchr-github chrchr-github merged commit 903eccb into danmar:main Oct 6, 2023
73 checks passed
@chrchr-github chrchr-github deleted the chr_Fix12039 branch October 6, 2023 07:53
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.

4 participants