[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 17:49:49 PST 2018


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.

This addresses a TODO from https://reviews.llvm.org/D41406. I re-used `PostImplicitCall` program point when calling the new callback, but it indeed causes problems: because implicit call has no associated statement, `MallocChecker` was unable to put visitor diagnostics over these nodes. Create a new class of `ProgramPoint`, namely `PostAllocatorCall`, which is a sub-class of `StmtPoint`, and use that when calling the callback.

This patch might cause slight conflicts with https://reviews.llvm.org/D41150.


Repository:
  rC Clang

https://reviews.llvm.org/D41800

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41800.128833.patch
Type: text/x-patch
Size: 21675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180106/2cd919fe/attachment-0001.bin>


More information about the cfe-commits mailing list