[PATCH] Inline allocator call when c++-allocator-inlining is specified as true

Jordan Rose jordan_rose at apple.com
Mon Feb 10 09:59:20 PST 2014


  Looks good to me! Will commit soon.


================
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:559-561
@@ +558,5 @@
+  AnalyzerOptions &Opts = AMgr.options;
+  // TODO: We're not evaluating allocators for all cases just yet as
+  // we're not handling the return value correctly when
+  // alpha.cplusplus.NewDeleteLeaks is check on.
+  if (Opts.mayInlineCXXAllocator())
----------------
I would rephrase this as "we're not handling the return value correctly, which causes false positives when the alpha.cplusplus.NewDeleteLeaks check is on". The return value isn't ever handled correctly; that's just the easiest way to get it to turn into a bug.


http://llvm-reviews.chandlerc.com/D2646



More information about the cfe-commits mailing list