Condition coverage not shown for `coverage.txt` generated by `llvm-cov show`

Hi,
jackpot :smiley: It works with SonarQube 10.0, we had 9.9 in our company.

But still some questions:

  1. The example states: llvm-cov show --show-branches=count.
    Does it make a difference if i´m using more options. --show-branches=count --show-branch-summary --show-instantiations -show-expansions -show-regions -show-line-counts

  2. Shall I use the -output-dir= and -format=html option?
    Or shall i redirect the output directly into a file like llvm-cov show --show-branches=count > coverage.txt

  3. Would be awesome if you could improve the example (steps 4 and 5 are very unspecific)

Best regards,
Stefano

No - you can specify them, but whether they are enabled or disabled won’t change what will be displayed in SonarQube, only --show-branches is significant.

Moreover according to https://github.com/llvm/llvm-project/blob/a499d675ae163429adff0bc3dc4f8215c12441c7/llvm/tools/llvm-cov/CodeCoverage.cpp#L746 and https://github.com/llvm/llvm-project/blob/a499d675ae163429adff0bc3dc4f8215c12441c7/llvm/tools/llvm-cov/CodeCoverage.cpp#L972 --show-branch-summary and --show-instantiations are enabled by default.

Yes - see https://github.com/sonarsource-cfamily-examples/linux-cmake-llvm-cov-gh-actions-sc/blob/fe289827174402357961392c34c64939d5b2bf60/.github/workflows/build.yml#L40

Feel free to create pull request :wink: