[PATCH] D41934: [analyzer] Fix CXXNewExpr callback order.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 10 18:27:26 PST 2018


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

Even if we later change how these callbacks work (as in http://lists.llvm.org/pipermail/cfe-dev/2017-December/056314.html), i wanted to clean up the current mess so that it at least worked in any reasonable manner.

1. Make the `PreStmt<CXXNewExpr>` callback actually work. It is called on `CXXNewExpr` pre-visit in `ExprEngine`.
2. In `-analyzer-config c++-allocator-inlining`, don't call the `PostStmt<CXXNewExpr>` callback twice when the allocator is inlined.


Repository:
  rC Clang

https://reviews.llvm.org/D41934

Files:
  lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
  lib/StaticAnalyzer/Core/ExprEngine.cpp
  lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
  test/Analysis/cxxnewexpr-callback-inline.cpp
  test/Analysis/cxxnewexpr-callback-noinline.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41934.129388.patch
Type: text/x-patch
Size: 6617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180111/9c70447b/attachment.bin>


More information about the cfe-commits mailing list