<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 10:19 AM, Vedant Kumar via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: vedantk<br>
Date: Thu Jun  2 12:19:45 2016<br>
New Revision: 271544<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=271544&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=271544&view=rev</a><br>
Log:<br>
[docs] Add a limitations section to SourceBasedCodeCoverage.rst<br>
<br>
Modified:<br>
    cfe/trunk/docs/SourceBasedCodeCoverage.rst<br>
<br>
Modified: cfe/trunk/docs/SourceBasedCodeCoverage.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/SourceBasedCodeCoverage.rst?rev=271544&r1=271543&r2=271544&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/SourceBasedCodeCoverage.rst?rev=271544&r1=271543&r2=271544&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/docs/SourceBasedCodeCoverage.rst (original)<br>
+++ cfe/trunk/docs/SourceBasedCodeCoverage.rst Thu Jun  2 12:19:45 2016<br>
@@ -165,9 +165,9 @@ A few final notes:<br>
   indexed profiles. To combine profiling data from multiple runs of a program,<br>
   try e.g:<br>
<br>
-.. code-block:: console<br>
+  .. code-block:: console<br>
<br>
-    % llvm-profdata merge -sparse foo1.profraw foo2.profdata -o foo3.profdata<br>
+      % llvm-profdata merge -sparse foo1.profraw foo2.profdata -o foo3.profdata<br>
<br>
 Format compatibility guarantees<br>
 ===============================<br>
@@ -184,3 +184,20 @@ Format compatibility guarantees<br>
 * There is a third format in play: the format of the coverage mappings emitted<br>
   into instrumented binaries. Tools must retain **backwards** compatibility<br>
   with these formats. These formats are not forwards-compatible.<br>
+<br>
+Drawbacks and limitations<br>
+=========================<br>
+<br>
+* Code coverage does not handle stack unwinding in the presence of uncaught<br>
+  exceptions precisely.</blockquote><div><br></div><div>I think it's more accurate to say "thrown exceptions" (or just "exceptions") instead of "uncaught exceptions". The latter could be interpreted as meaning that if the exception is caught later (in a caller of f), then the result might still be precise.</div><div><br></div><div>Also setjmp/longjmp can affect things too, no?</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Consider the following function:<br>
+<br>
+  .. code-block:: cpp<br>
+<br>
+      int f() {<br>
+        may_throw();<br>
+        return 0;<br>
+      }<br>
+<br>
+  If the function ``may_throw()`` propagates an exception into ``f``, the code<br>
+  coverage tool may mark the ``return`` statement as executed even though it is<br>
+  not.<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>