[PATCH] D40560: [analyzer] WIP: Get construction into `operator new` running in simple cases.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 15:39:30 PST 2017


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?
Whooooooooops!! Thanks!

Apparently, `ImmutableList::getTail()` doesn't crash when the list is empty. And i thought we're catching this sort of bugs.

Added the relevant assertion into `popCXXNewAllocatorValue()`.


https://reviews.llvm.org/D40560





More information about the cfe-commits mailing list