Skip to content

C++: Fix QLDoc on cmpWithLinearBound #15262

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 1 commit into from
Jan 9, 2024

Conversation

MathiasVP
Copy link
Contributor

This PR addresses the two comments on the QLDoc for cmpWithLinearBound mentioned in #15248.

@MathiasVP MathiasVP requested a review from a team as a code owner January 9, 2024 10:08
@github-actions github-actions bot added the C++ label Jan 9, 2024
@MathiasVP MathiasVP added the no-change-note-required This PR does not need a change note label Jan 9, 2024
@MathiasVP MathiasVP linked an issue Jan 9, 2024 that may be closed by this pull request
Comment on lines +358 to 360
* `cmpWithLinearBound(guard, v, Lesser(), true)` and
* `cmpWithLinearBound(guard, v, Greater(), false)` hold.
*
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you test that this change is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quick-eval'ing the predicate on this snippet:

int test(int v) {
  if(4 - v > 5) {
    return 1;
  }
  return 0;
}

gives: Screenshot 2024-01-09 at 10 24 42

@MathiasVP MathiasVP merged commit 1c81c9b into github:main Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ 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.

C++: Documentation clarification for cmpWithLinearBound
2 participants