HomePhabricator

[analyzer] operator new: Add a new checker callback, check::NewAllocator.

Description

[analyzer] operator new: Add a new checker callback, check::NewAllocator.

The callback runs after operator new() and before the construction and allows
the checker to access the casted return value of operator new() (in the
sense of r322780) which is not available in the PostCall callback for the
allocator call.

Update MallocChecker to use the new callback instead of PostStmt<CXXNewExpr>,
which gets called after the constructor.

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

Details

Committed
dergachevJan 17 2018, 3:46 PM
Differential Revision
D41406: [analyzer] Add a new checker callback, check::NewAllocator.
Parents
rL322786: [LangRef] Clarify Varargs forwarding for musttail calls.
Branches
Unknown
Tags
Unknown