<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126307>126307</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm-cov to expose exactly what lines it considers covered
</td>
</tr>
<tr>
<th>Labels</th>
<td>
coverage
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vmiklos
</td>
</tr>
</table>
<pre>
Hi,
First, thanks for llvm-cov, it's a great tool -- Rust has 'cargo llvm-cov' that wraps llvm-cov for Rust code and it works nicely, almost.
One pain point is to figure out details when dealing with line coverage. We invoke 'llvm-cov export ... -format=text' to get the JSON output, and that does tell us if line coverage is complete or not (totals -> lines -> percent), and also this data is provided per-file (files -> ... -> summary -> lines -> percent). However, when percent is not 100, it would be useful to show which lines are not covered.
I understand that deciding if a line is covered or not is tricky, but I assume llvm-cov has this info at some stage, since it provides a percentage summary.
So the request would be to expose exactly which lines are not covered. At the moment 'cargo llvm-cov' tries to infer this from the current JSON output, but that's not perfect in all cases. When it works, it allows us to produce output like this:
```
Uncovered Lines:
src/test.rs: 15, 16
```
But for this to work, we need the code at https://github.com/taiki-e/cargo-llvm-cov/blob/09262deeaaabb18889ef265debc6c54600bd1d1a/src/json.rs#L208 to produce this, and feels like llvm-cov already has this info at some point, it's just thrown away.
Thanks.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8VVGP2zYM_jXKCxFDVi5O8uCHtF3QDsUKrBv6TEt0rIssZRKd3P37QYpzdyu6AwLYUETy-z5-pDEle_RErVh_EOtPC5x4CLG9jPbkQlp0wTy3n61QH4XcC7k_2JhYqI_AA_pTgj5EcO4yLnW45GPLQm0SIBwjIQOH4GC5hD-nxDBgAqE2GuMxvAna5FwM14jn9HJcEpcoHQwBegOW4RriKYG3mtxzroZuDImrG7RvnuCM1sM5WM9gE3CA3h6nSBAmBkOM1iW4DuTBEDrrj3C1PICznkCHC0U8UgU_CKy_hBN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