]> granicus.if.org Git - clang/commit
[analyzer] Handle when the dynamic type is worse than the static type.
authorJordan Rose <jordan_rose@apple.com>
Wed, 12 Sep 2012 21:48:17 +0000 (21:48 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 12 Sep 2012 21:48:17 +0000 (21:48 +0000)
commitd66b3c56a5da1cbaf5ec12811ee7221231b6c301
tree92d5ed55387a32902b71753f604701520c13d01b
parentfe3769dbb448edf8e5ece13b14017608558d4763
[analyzer] Handle when the dynamic type is worse than the static type.

Currently we don't update the dynamic type of a C++ object when it is
cast. This can cause the situation above, where the static type of the
region is now known to be a subclass of the dynamic type.

Once we start updating DynamicTypeInfo in response to the various kinds
of casts in C++, we can re-add this assert to make sure we don't miss
any cases. This work is tracked by <rdar://problem/12287087>.

In -Asserts builds, we will simply not return any runtime definition
when our DynamicTypeInfo is known to be incorrect like this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163745 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/CallEvent.cpp