NoQ added a comment.
Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:522
+symVal = peekCXXNewAllocatorValue(State);
+ State = popCXXNewAllocatorValue(State);
+
a.sidorin wrote:
> Should this be under 'if' as well?
Whops!! Thanks!
NoQ updated this revision to Diff 127420.
NoQ added a comment.
- Fix pop from empty stack.
- Add recursive operator new tests.
- Disable argument invalidation when the allocator was inlined (needed for
those tests to work)
In https://reviews.llvm.org/D40560#957653, @xazax.hun wrote:
> I
a.sidorin added a comment.
Hi Artem. This patch looks OK, just stylish issues.
Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:112
+ // It means that we cannot handle construction into null or garbage pointers.
+ // Such cosntructors need to be handled by checkers to
xazax.hun added a comment.
In https://reviews.llvm.org/D40560#947514, @NoQ wrote:
> Replaced the live expression hack with a slightly better approach. It doesn't
> update the live variables analysis to take `CFGNewAllocator` into account,
> but at least tests now pass.
>
> In order to keep the
NoQ updated this revision to Diff 125850.
NoQ added a comment.
Replaced the live expression hack with a slightly better approach. It doesn't
update the live variables analysis to take `CFGNewAllocator` into account, but
at least tests now pass.
In order to keep the return value produced by the
NoQ added a comment.
> for the sake of this proof-of-concept, i've crudely disabled garbage
> collection on the respective moments of time
Forgot to mention that this breaks tests in `NewDeleteLeaks-PR19102.cpp`, which
are still failing in the present revision. Leak warnings get delayed to
NoQ created this revision.
Herald added subscribers: rnkovacs, eraman.
Under the assumption of `-analyzer-config c++-allocator-inlining=true`, which
enables evaluation of `operator new` as a regular function call, this patch
shows what it takes to actually inline the constructor into the