Porting this issue from: https://github.com/hebasto/bitcoin/issues/341.
It’s not clear if using our Coverage build type works with Clang, or not. In the linked thread there are simultaneous claims that it “works”, but also that it does not work. It seems from the discussion that even using GCC with the Coverage build type is flaky.
There’s been suggestions to add a Coverage mode for Clang: https://github.com/hebasto/bitcoin/pull/233, however adding a second way of doing things, when the current way may not work properly, and (likely?) currently isn’t being used by anyone, doesn’t seem like a good approach, and adds even more complication to the build system. Note that devs are already using Clang for coverage regardless of if it currently exists in the build system (cc @dergoegge, @marcofleon, @vasild).
If using Clangs native coverage mode is what is preferred/is “better”, then it’d seem better for us to replace the current, more GCC focussed implementation, with one that is geared towards LLVM/Clang, if the idea is to provide something that works out-of-the-box, and is generally used by the developers working on the project.