Commit Graph

5 Commits

Author SHA1 Message Date
Zalathar
f521dd4ed9 Switch over to hybrid HIR-aware coverage spans
Instead of trying to heuristically recover source-code spans from MIR soup, we
can now take advantage of the `CoverageKind::Point` statements injected for
specific HIR expressions.

This is a transitional implementation that lets us remove the old MIR-soup
code, but still relies heavily on the existing span-refinement heuristics, and
does not take advantage of the full possibilities of HIR-aware coverage
instrumentation.

In order to avoid annoying never-executed spans in code that contains
assertions, a heuristic has been added that ignores any expression within the
arguments of a macro-expanded function call that returns `!`.

Some coverage tests now require `//@ min-llvm-version: 23`, due to changes in
how LLVM sorts the coverage mapping entries.
2026-09-06 10:24:48 +10:00
Zalathar
5d15124c62 coverage: Reduce and clarify the context-mismatch test case 2026-05-15 22:06:32 +10:00
Zalathar
0418f9aa42 coverage: Add a test case for a previously-unknown span mismatch 2026-02-03 22:53:38 +11:00
Zalathar
1f423a6e42 coverage: Add a test for macros that only contain other macros 2026-01-20 13:29:09 +11:00
Zalathar
a3bf870441 coverage: Test some edge cases involving macro expansion 2025-11-30 18:31:54 +11:00