[cfe-commits] r154543 - /cfe/trunk/test/Analysis/dynamic-cast.cpp
Anna Zaks
ganna at apple.com
Wed Apr 11 15:29:38 PDT 2012
Author: zaks
Date: Wed Apr 11 17:29:38 2012
New Revision: 154543
URL: http://llvm.org/viewvc/llvm-project?rev=154543&view=rev
Log:
[analyzer] Another dynamic_cast false positive/negative.
Modified:
cfe/trunk/test/Analysis/dynamic-cast.cpp
Modified: cfe/trunk/test/Analysis/dynamic-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dynamic-cast.cpp?rev=154543&r1=154542&r2=154543&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/dynamic-cast.cpp (original)
+++ cfe/trunk/test/Analysis/dynamic-cast.cpp Wed Apr 11 17:29:38 2012
@@ -221,3 +221,10 @@
return *res; // expected-warning{{Dereference of null pointer}}
}
+// Does not work when we new an object.
+int testDynCastFail3() {
+ A *a = new A();
+ B *b = dynamic_cast<B*>(a);
+ return b->m;
+}
+
More information about the cfe-commits
mailing list