diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-31 17:05:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-31 17:05:24 +0200 |
| commit | 7667a917789b7a96edfeacc460c307333b32101a (patch) | |
| tree | 29fa9734aad0a808f8fe6e5c0253988ae114a8e6 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | e9046602c54e17dd73cd1db5ca36924bd55e7ddf (diff) | |
| parent | 35a8746832a4d9103f317c5cac56cfa1e0316d8c (diff) | |
| download | rust-7667a917789b7a96edfeacc460c307333b32101a.tar.gz rust-7667a917789b7a96edfeacc460c307333b32101a.zip | |
Rollup merge of #125756 - Zalathar:branch-on-bool, r=oli-obk
coverage: Optionally instrument the RHS of lazy logical operators (This is an updated version of #124644 and #124402. Fixes #124120.) When `||` or `&&` is used outside of a branching context (such as the condition of an `if`), the rightmost value does not directly influence any branching decision, so branch coverage instrumentation does not treat it as its own true-or-false branch. That is a correct and useful interpretation of “branch coverage”, but might be undesirable in some contexts, as described at #124120. This PR therefore adds a new coverage level `-Zcoverage-options=condition` that behaves like branch coverage, but also adds additional branch instrumentation to the right-hand-side of lazy boolean operators. --- As discussed at https://github.com/rust-lang/rust/issues/124120#issuecomment-2092394586, this is mainly intended as an intermediate step towards fully-featured MC/DC instrumentation. It's likely that we'll eventually want to remove this coverage level (rather than stabilize it), either because it has been incorporated into MC/DC instrumentation, or because it's getting in the way of future MC/DC work. The main appeal of landing it now is so that work on tracking conditions can proceed concurrently with other MC/DC-related work. ````@rustbot```` label +A-code-coverage
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
