Commit 0fff985
committed
coverage: Never emit improperly-ordered coverage regions
If we emit a coverage region that is improperly ordered (end < start),
`llvm-cov` will fail with `coveragemap_error::malformed`, which is inconvenient
for users and also very hard to debug.
Ideally we would fix the root causes of these situations, but they tend to
occur in very obscure edge-case scenarios (often involving nested macros), and
we don't always have a good MCVE to work from. So it makes sense to also have a
catch-all check that will prevent improperly-ordered regions from ever being
emitted.1 parent 5b49e17 commit 0fff985
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
289 | 302 | | |
290 | 303 | | |
291 | 304 | | |
| |||
0 commit comments