[analyzer] operator new: Add a new ProgramPoint for check::NewAllocator.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 18 Jan 2018 00:50:19 +0000 (00:50 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 18 Jan 2018 00:50:19 +0000 (00:50 +0000)
commit1c64e617f57297e53abc3d48bedb5a4e3375f644
treece44fbc7aea2a9738668de9906a1e29496f42c55
parent0c79eab03d5bd5b74ee6d30d663bdf4a07764a04
[analyzer] operator new: Add a new ProgramPoint for check::NewAllocator.

Add PostAllocatorCall program point to represent the moment in the analysis
between the operator new() call and the constructor call. Pointer cast from
"void *" to the correct object pointer type has already happened by this point.

The new program point, unlike the previously used PostImplicitCall, contains a
reference to the new-expression, which allows adding path diagnostics over it.

Differential Revision: https://reviews.llvm.org/D41800
rdar://problem/12180598

llvm-svn: 322796
clang/include/clang/Analysis/ProgramPoint.h
clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/test/Analysis/NewDelete-path-notes.cpp