[all-commits] [llvm/llvm-project] e15997: [llvm-cov] Add failing test for gap region line co...

Maksim Levental via All-commits all-commits at lists.llvm.org
Sat Jun 13 19:11:45 PDT 2026


  Branch: refs/heads/users/makslevental/coverage-v2
  Home:   https://github.com/llvm/llvm-project
  Commit: e159976973d0eb8b23f9d4821a77446ba3b18027
      https://github.com/llvm/llvm-project/commit/e159976973d0eb8b23f9d4821a77446ba3b18027
  Author: makslevental <maksim.levental at gmail.com>
  Date:   2026-06-13 (Sat, 13 Jun 2026)

  Changed paths:
    A llvm/test/tools/llvm-cov/Inputs/gap-region-quirk/gap-quirk-v2.cpp
    A llvm/test/tools/llvm-cov/Inputs/gap-region-quirk/gap-quirk.covmapping
    A llvm/test/tools/llvm-cov/Inputs/gap-region-quirk/gap-quirk.profdata
    A llvm/test/tools/llvm-cov/gap-region-line-coverage.test

  Log Message:
  -----------
  [llvm-cov] Add failing test for gap region line coverage bug

LineCoverageStats incorrectly reports lines as uncovered when a gap
region with count=0 wraps into a line that has non-entry segments
with count > 0.

The test demonstrates this with two scoped blocks containing
never-taken early returns. The statement between them ("int result =
42;") and after them ("return true;") are genuinely executed but
reported with count=0 because the gap region from each block's
closing "}" incorrectly suppresses the line's execution count.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list