C++ Code Coverage with Bazel
Recently, it was reported that C++20 module interface files generate no code coverage data. Upon investigating, I discovered that this is due to an instrumentation file that only accounts for explicitly instrumented files. If a file is not listed, its coverage data is skipped. For more details, refer to CoverageOutputGenerator–Main.java#L151-L155.
To address this, I’ve created a patch to include module interfaces in the instrumentation file. Below is the fix: