diff options
author | Anna Zaks <ganna@apple.com> | 2012-04-11 22:29:38 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-04-11 22:29:38 +0000 |
commit | c3fa98f67038bec98651f833b685c104ef6438ab (patch) | |
tree | c2d9ba7af45a152d43c6a5df7f8dc1233545f58e /test/Analysis/dynamic-cast.cpp | |
parent | 7ea1c5639764aa3ebe124f4350c5f2b3be795667 (diff) |
[analyzer] Another dynamic_cast false positive/negative.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/dynamic-cast.cpp')
-rw-r--r-- | test/Analysis/dynamic-cast.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Analysis/dynamic-cast.cpp b/test/Analysis/dynamic-cast.cpp index 62481e3635..8e63b2bcb3 100644 --- a/test/Analysis/dynamic-cast.cpp +++ b/test/Analysis/dynamic-cast.cpp @@ -221,3 +221,10 @@ int testDynCastFalsePositive(BB *c) { 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; +} + |