[clang] [Coverage] Fix assertion failure when a -isystem header invokes a user macro (PR #195427)
via cfe-commits
cfe-commits at lists.llvm.org
Sat May 2 01:14:47 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 53769 tests passed
* 1173 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CoverageMapping/system_macro_switch.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 4
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\CoverageMapping\Output\system_macro_switch.cpp.tmp && split-file C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\system_macro_switch.cpp C:\_work\llvm-project\llvm-project\build\tools\clang\test\CoverageMapping\Output\system_macro_switch.cpp.tmp && cd C:\_work\llvm-project\llvm-project\build\tools\clang\test\CoverageMapping\Output\system_macro_switch.cpp.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\CoverageMapping\Output\system_macro_switch.cpp.tmp'
# note: command had no output on stdout or stderr
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\system_macro_switch.cpp' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\CoverageMapping\Output\system_macro_switch.cpp.tmp'
# note: command had no output on stdout or stderr
# executed command: cd 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\CoverageMapping\Output\system_macro_switch.cpp.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -isystem sys a.cpp | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\system_macro_switch.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -isystem sys a.cpp
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\system_macro_switch.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\system_macro_switch.cpp:7:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: _ZL3fooi:
# | ^
# | <stdin>:1:1: note: scanning from here
# | main:
# | ^
# | <stdin>:3:8: note: possible intended match here
# | <unknown>:?foo@@YAXH at Z:
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\system_macro_switch.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: main:
# | label:7'0 X~~~~~ error: no match found
# | 2: File 0, 9:29 -> 9:43 = #0
# | label:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 3: <unknown>:?foo@@YAXH at Z:
# | label:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | label:7'1 ? possible intended match
# | 4: File 0, 1:24 -> 7:2 = #0
# | label:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5: Branch,File 0, 2:11 -> 2:12 = ((#2 + #3) + #4), (((#0 - #2) - #3) - #4)
# | label:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: Gap,File 0, 2:14 -> 5:10 = 0
# | label:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 7: File 0, 4:21 -> 5:10 = ((#2 + #3) + #4)
# | label:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 8: File 0, 4:21 -> 5:10 = (#2 + #3)
# | label:7'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/195427
More information about the cfe-commits
mailing list