Commit Graph

2 Commits

Author SHA1 Message Date
Zalathar
d90fd027c8 coverage: Use SpanMarker to mark the full condition of if !
When MIR is built for an if-not expression, the `!` part of the condition
doesn't correspond to any MIR statement, so coverage instrumentation normally
can't see it.

We can fix that by deliberately injecting a dummy statement whose sole purpose
is to associate that span with its enclosing block.
2023-12-08 22:40:49 +11:00
Zalathar
d2d742c4cc coverage: Add a dedicated test for coverage of if ! 2023-12-08 22:40:49 +11:00