]> granicus.if.org Git - clang/commit
[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)
commit5b43bb5e18c4748daf304e1c5ac22ae721867e06
treebf6e835a460000b81809aaf67e37c36ea0743302
parent0e15f138675cc570c7dc1853d3eeae0b38844bdc
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322796 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/ProgramPoint.h
lib/StaticAnalyzer/Core/CheckerManager.cpp
lib/StaticAnalyzer/Core/CoreEngine.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/Analysis/NewDelete-path-notes.cpp