]> granicus.if.org Git - clang/commit
[analyzer] Handle zeroing CXXConstructExprs.
authorJordan Rose <jordan_rose@apple.com>
Fri, 21 Jun 2013 00:59:00 +0000 (00:59 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 21 Jun 2013 00:59:00 +0000 (00:59 +0000)
commit98123284826bb4ce422775563ff1a01580ec5766
treeb29e38877d3117b2f1c597910f56865e64524aa6
parentff8e04e678faddb9f1c876f8a850943be57471d3
[analyzer] Handle zeroing CXXConstructExprs.

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.

As a bonus, trivial default constructors are now no longer inlined; they
are instead processed explicitly by ExprEngine. This has a (positive)
effect on the generated path edges: they no longer stop at a default
constructor call unless there's a user-provided implementation.

<rdar://problem/14212563>

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