[cfe-dev] clang-cl: missing code coverage when exception handling is enabled
Jan Kokemüller via cfe-dev
cfe-dev at lists.llvm.org
Mon Apr 23 08:23:37 PDT 2018
On 23.04.2018 16:52, David Blaikie wrote:
> What do you mean by "won't work" - in the sense that a function that has exceptions enabled but no exception path is tested won't have full coverage? That seems arguably correct/useful?
Currently functions that use exceptions are not instrumented at all. All
code in such functions shows up as '-' in the .gcov files.
For example: If you use std::string in a function and have exceptions
enabled with "/EHsc" this function won't be instrumented as std::string
might throw std::bad_alloc.
This is a pretty new feature though. It works great for the Firefox
code base, but they have exceptions disabled I think.
More information about the cfe-dev