summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-09-11 16:46:50 +0000
committerJordan Rose <jordan_rose@apple.com>2013-09-11 16:46:50 +0000
commitd8dfae602d7b2e42b0eef6b1e7779c96833f83c1 (patch)
treeaf06bc81e9aecebae7d46564e161c8d651e500d5 /lib/CodeGen/CGExprConstant.cpp
parent42ade496f79d2b9b1ff9fbdc30dd025c168be7a3 (diff)
downloadclang-d8dfae602d7b2e42b0eef6b1e7779c96833f83c1.tar.gz
clang-d8dfae602d7b2e42b0eef6b1e7779c96833f83c1.tar.bz2
clang-d8dfae602d7b2e42b0eef6b1e7779c96833f83c1.tar.xz
[analyzer] Handle zeroing constructors for fields of structs with empty bases.
RegionStore tries to protect against accidentally initializing the same region twice, but it doesn't take subregions into account very well. If the outer region being initialized is a struct with an empty base class, the offset of the first field in the struct will be 0. When we initialize the base class, we may invalidate the contents of the struct by providing a default value of Unknown (or some new symbol). We then go to initialize the member with a zeroing constructor, only to find that the region at that offset in the struct already has a value. The best we can do here is to invalidate that value and continue; neither the old default value nor the new 0 is correct for the entire struct after the member constructor call. The correct solution for this is to track region extents in the store. <rdar://problem/14914316> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
0 files changed, 0 insertions, 0 deletions