From: Vedant Kumar Date: Thu, 2 Jun 2016 17:19:45 +0000 (+0000) Subject: [docs] Add a limitations section to SourceBasedCodeCoverage.rst X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5614d4b4c77d82251a315b41b7d57e1b584455c;p=clang [docs] Add a limitations section to SourceBasedCodeCoverage.rst git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271544 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/SourceBasedCodeCoverage.rst b/docs/SourceBasedCodeCoverage.rst index 7ab78404e5..0586f2ec84 100644 --- a/docs/SourceBasedCodeCoverage.rst +++ b/docs/SourceBasedCodeCoverage.rst @@ -165,9 +165,9 @@ A few final notes: indexed profiles. To combine profiling data from multiple runs of a program, try e.g: -.. code-block:: console + .. code-block:: console - % llvm-profdata merge -sparse foo1.profraw foo2.profdata -o foo3.profdata + % llvm-profdata merge -sparse foo1.profraw foo2.profdata -o foo3.profdata Format compatibility guarantees =============================== @@ -184,3 +184,20 @@ Format compatibility guarantees * There is a third format in play: the format of the coverage mappings emitted into instrumented binaries. Tools must retain **backwards** compatibility with these formats. These formats are not forwards-compatible. + +Drawbacks and limitations +========================= + +* Code coverage does not handle stack unwinding in the presence of uncaught + exceptions precisely. Consider the following function: + + .. code-block:: cpp + + int f() { + may_throw(); + return 0; + } + + If the function ``may_throw()`` propagates an exception into ``f``, the code + coverage tool may mark the ``return`` statement as executed even though it is + not.