Issue 234979
Summary `llvm-cov show -format=html` appears to generate an unmatched closing
Labels new issue
Assignees
Reporter Brumberg
    ### Description

`llvm-cov show -format=html` appears to generate an unmatched closing
`</td>` in the header of the source coverage table.

For example, the generated HTML contains:

 <tr><td><pre>Line</pre></td><td><pre>Count</pre></td><td><pre>Source</pre></td></td></tr>

There are three opening `<td>` elements but four closing `</td>` elements.

### Expected output

 <tr><td><pre>Line</pre></td><td><pre>Count</pre></td><td><pre>Source</pre></td></tr>

### Observed behavior

I reproduced this in multiple independently generated HTML coverage
reports for different source and header files.

Web browsers recover from the malformed markup, so this may not normally
be visible when viewing the report. However, when processing the generated
HTML with a parser that validates the element structure, the additional
closing tag is reported as an error.

### Reproduction

Generate an HTML coverage report using:

    llvm-cov show <...> -format=html

and inspect the header row of the generated source table.

### Environment

`llvm-cov --version`:
clang version 19.1.5
Target: i686-pc-windows-msvc
Thread model: posix


Command used to generate the report:

set "LLVM_DIR=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\Llvm\x64\bin"
set "LLVM_PROFDATA=%LLVM_DIR%\llvm-profdata.exe"
set "LLVM_COV=%LLVM_DIR%\llvm-cov.exe"
"%LLVM_COV%" show "%TEST_EXE%" -instr-profile="" -format=html -output-dir="%COVERAGE_REPORT%" !SOURCE_FILES!
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to