]> granicus.if.org Git - clang/commit
[analyzer] Handle dynamic_casts that turn out to be upcasts.
authorJordan Rose <jordan_rose@apple.com>
Mon, 13 Aug 2012 22:11:42 +0000 (22:11 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 13 Aug 2012 22:11:42 +0000 (22:11 +0000)
commit0a5629812019ce8bef86ade5425ac261bb544fd8
tree271318106ac224ce169a493550cf04b22815cac0
parentb11a3ada9a22e146c6edd33bcc6301e221fedd7a
[analyzer] Handle dynamic_casts that turn out to be upcasts.

This can occur with multiple inheritance, which jumps from one parent to
the other, and with virtual inheritance, since virtual base regions always
wrap the actual object and can't be nested within other base regions.

This also exposed some incorrect logic for multiple inheritance: even if B
is known not to derive from C, D might still derive from both of them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161798 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/RegionStore.cpp
test/Analysis/derived-to-base.cpp