[analyzer] Don't accidentally strip off base object regions for lazy bindings.
authorJordan Rose <jordan_rose@apple.com>
Tue, 19 Feb 2013 20:28:33 +0000 (20:28 +0000)
committerJordan Rose <jordan_rose@apple.com>
Tue, 19 Feb 2013 20:28:33 +0000 (20:28 +0000)
commit111aa9a28bd89fe0209157c1537717aa244c6a38
tree8748978f40c843031cd6e7fc139d9d6201a86cb3
parente4df5eb34a47207941f53787c48dff20f1b4ff65
[analyzer] Don't accidentally strip off base object regions for lazy bindings.

If a base object is at a 0 offset, RegionStoreManager may find a lazy
binding for the entire object, then try to attach a FieldRegion or
grandparent CXXBaseObjectRegion on top of that (skipping the intermediate
region). We now preserve as many layers of base object regions necessary
to make the types match.

<rdar://problem/13239840>

llvm-svn: 175556
clang/lib/StaticAnalyzer/Core/RegionStore.cpp
clang/test/Analysis/derived-to-base.cpp