Skip to content

C++: Fix interface for GuardCondition.comparesEq and GuardCondition.ensuresEq #15976

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

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

MathiasVP
Copy link
Contributor

I got the interface slightly wrong in #15958: In

predicate comparesEq(Expr e, int k, boolean areEqual, boolean testIsTrue) { none() }
it doesn't make sense to simply have a boolean to determine whether "the test was true or false" since the "test" may be the scrutinee of a switch. So instead, this PR updates the newly added predicates to instead have an AbstractValue column. The effect of this is visible in the second commit where we previously had:

| 61 | i == 0 when i is true |
| 61 | i == 1 when i is true |
| 61 | i == 2 when i is true |

which made no sense.

Note that this isn't a breaking change since the new predicates has only been there for about ... 30 minutes 😂

@MathiasVP MathiasVP requested a review from a team as a code owner March 19, 2024 14:48
@github-actions github-actions bot added the C++ label Mar 19, 2024
@MathiasVP MathiasVP added no-change-note-required This PR does not need a change note and removed C++ labels Mar 19, 2024
@MathiasVP
Copy link
Contributor Author

DCA looks uneventful 🎉

@MathiasVP MathiasVP merged commit aeb667c into github:main Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants