<div dir="ltr"><div>Hello,<br></div><div><br></div><div>I originally posted this on [llvm-dev] but this is hopefully more relevant.</div><div><br></div><div>I have an existing test suite I’m gathering coverage numbers for. I'm getting 0% coverage with my C++ code, but the same setup works for C.<br></div><div><br></div><div>I've configured the build framework to set the compilation flags as
follows:</div><div><br></div><div> clang++ -g -O2 -fprofile-arcs -ftest-coverage ...</div><div><br></div><div>The
suite is a mixture of C and C++ code, and when I run lcov to generate a
report, the c++ tests are mostly reporting 0% coverage. I say mostly
because of static initializers being reported as ran once. The C tests code correctly reports
coverage for other shared libraries under test.<br></div><div><br></div><div>Here's my compiler version:</div><div><br></div><div> $ clang++ --version<br> clang version 3.9.1 (tags/RELEASE_391/final)<br><br></div><div>I'm wondering if there are any flags or debugging things I can instrument with the c++ code to find out why the numbers aren't being recorded.<br></div><div><br></div><div>Any help would be appreciated, this is driving me nuts.<br></div><div><br></div><div>Thanks,</div><div>Patrick</div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div></div></div></div>