Search code examples
code-coverageclang++

Code coverage with clang++


Is there a way to find code coverage using clang++ for C++ code.

I know gcov but it works only on the code compiled with GCC.


Solution

  • EDIT: Clang should be able to generate code coverage these days (taking the same command line arguements as gcc), but you will probably want a newish build and I'm still having trouble running lcov on the output. (see Clang Code Coverage Invalid Output)