]> granicus.if.org Git - clang/commit
[analyzer] Handle zeroing CXXConstructExprs.
authorJordan Rose <jordan_rose@apple.com>
Tue, 25 Jun 2013 01:56:08 +0000 (01:56 +0000)
committerJordan Rose <jordan_rose@apple.com>
Tue, 25 Jun 2013 01:56:08 +0000 (01:56 +0000)
commitbe35df19cf9540c03048942ecafc6811643073ec
tree15a605e8a2f31f9eca313f1d86f7a1ea69ba110f
parent1fc9111d85c3929018cd5c85dd14f3dbb5d23d68
[analyzer] Handle zeroing CXXConstructExprs.

Re-apply r184511, reverted in r184561, with the trivial default constructor
fast path removed -- it turned out not to be necessary here.

Certain expressions can cause a constructor invocation to zero-initialize
its object even if the constructor itself does no initialization. The
analyzer now handles that before evaluating the call to the constructor,
using the same "default binding" mechanism that calloc() uses, rather
than simply ignoring the zero-initialization flag.

<rdar://problem/14212563>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184815 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
test/Analysis/ctor.mm [moved from test/Analysis/ctor-inlining.mm with 83% similarity]