Instrumentation of inline functions

Last edited on

Inline functions are instrumented like other functions. This might lead to problems if they belong e.g. to template classes for data structures in an external library: Instrumenting them could slow down the instrumented program too much and the coverage data for them are not really needed, since they do not belong to the program that is tested.

To avoid instrumenting templates and inline functions of a third party library or the standard C++ library, CoverageScanner therefore only instruments all functions and procedures of the source files and the headers files which are not present in the system directories.

If code coverage for a header file in these directories needs to be measured, it is necessary to tell CoverageScanner to instrument it too. The command line options --cs-include-file-regex, --cs-include-file-wildcard and --cs-include-path enforce the instrumentation of additional files.