<div class="gmail_quote">On Tue, Apr 10, 2012 at 1:59 PM, Anna Zaks <span dir="ltr"><<a href="mailto:ganna@apple.com">ganna@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Added: cfe/trunk/test/Analysis/dynamic-cast.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dynamic-cast.cpp?rev=154434&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dynamic-cast.cpp?rev=154434&view=auto</a><br>

==============================================================================<br>
--- cfe/trunk/test/Analysis/dynamic-cast.cpp (added)<br>
+++ cfe/trunk/test/Analysis/dynamic-cast.cpp Tue Apr 10 15:59:00 2012<br></blockquote><div>[...] </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+// False negatives.<br>

+<br>
+// Symbolic regions are not typed, so we cannot deduce that the cast will<br>
+// always fail in this case.<br></blockquote><div><br></div><div>The cast won't always fail:</div><div><br></div><div>class D : public B, public C {};</div><div>int main() {</div><div>  D d;</div><div>  testDynCastFail1(&d);</div>
<div>}</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+int testDynCastFail1(class C *c) {<br>
+  B *b = 0;<br>
+  b = dynamic_cast<B*>(c);<br>
+  return b->m;<br>
+}</blockquote></div>