[PATCH] D41266: [analyzer] With c++-allocator-inlining, fix memory space for operator new pointers.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 9 19:38:08 PST 2018


NoQ added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:477
+bool ExprEngine::isStandardGlobalOperatorNewFunction(const CXXNewExpr *CNE) {
+  const FunctionDecl *FD = CNE->getOperatorNew();
+  if (FD && !isa<CXXMethodDecl>(FD) && !FD->isVariadic()) {
----------------
dcoughlin wrote:
> I realize this isn't your code, but could we use `FunctionDecl::isReplaceableGlobalAllocationFunction() here?`
Hmm. Totally. That's much better.


https://reviews.llvm.org/D41266





More information about the cfe-commits mailing list