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

coverage: Optionally instrument the RHS of lazy logical operators #125756

Merged
merged 3 commits into from
May 31, 2024

Commits on May 30, 2024

  1. Configuration menu
    Copy the full SHA
    fa563c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20174e6 View commit details
    Browse the repository at this point in the history
  3. coverage: Instrument the RHS value of lazy logical operators

    When a lazy logical operator (`&&` or `||`) occurs outside of an `if`
    condition, it normally doesn't have any associated control-flow branch, so we
    don't have an existing way to track whether it was true or false.
    
    This patch adds special code to handle this case, by inserting extra MIR blocks
    in a diamond shape after evaluating the RHS. This gives us a place to insert
    the appropriate marker statements, which can then be given their own counters.
    Zalathar committed May 30, 2024
    Configuration menu
    Copy the full SHA
    35a8746 View commit details
    Browse the repository at this point in the history