[llvm] [llvm-cov][CoverageMapping] Fix LineCoverageStats incorrectly using gap region count (PR #203740)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 13 21:10:46 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 135775 tests passed
* 3445 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.tools/llvm-cov/gap-region-line-coverage.test</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 21
c:\_work\llvm-project\llvm-project\build\bin\llvm-cov.exe show C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov/Inputs/gap-region-quirk/gap-quirk.covmapping    -instr-profile C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov/Inputs/gap-region-quirk/gap-quirk.profdata    -path-equivalence=/tmp,C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov/Inputs/gap-region-quirk    2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix=SHOW C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov\gap-region-line-coverage.test
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-cov.exe' show 'C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov/Inputs/gap-region-quirk/gap-quirk.covmapping' -instr-profile 'C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov/Inputs/gap-region-quirk/gap-quirk.profdata' '-path-equivalence=/tmp,C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov/Inputs/gap-region-quirk'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefix=SHOW 'C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov\gap-region-line-coverage.test'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov\gap-region-line-coverage.test:27:10: error: SHOW: expected string not found in input
# | // SHOW: 15| 1| int result = 42;
# |          ^
# | <stdin>:1:1: note: scanning from here
# | error: C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov\Inputs\gap-region-quirk\tmp\gap-quirk-v2.cpp: no such file or directory
# | ^
# | <stdin>:1:123: note: possible intended match here
# | error: C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov\Inputs\gap-region-quirk\tmp\gap-quirk-v2.cpp: no such file or directory
# |                                                                                                                           ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov\gap-region-line-coverage.test
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: error: C:\_work\llvm-project\llvm-project\llvm\test\tools\llvm-cov\Inputs\gap-region-quirk\tmp\gap-quirk-v2.cpp: no such file or directory 
# | check:27'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:27'1                                                                                                                               ?                 possible intended match
# |             2: warning: The file '\tmp\tmp\gap-quirk-v2.cpp' isn't covered. 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/203740


More information about the llvm-commits mailing list