[PATCH] D41250: [analyzer] Model implied cast around operator new().
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 15 16:21:32 PST 2017
NoQ updated this revision to Diff 127202.
NoQ added a comment.
`VisitCXXNewExpr` is too late. We need to perform cast before calling the constructor. Otherwise bad things happen, for instance `performTrivialCopy` would construct another void region :)
Move the cast to `pushCXXNewAllocatorValue()`. This way we perform the cast before putting this-value into our temporary storage (the top of `CXXNewAllocatorValueStack`, or `_this` in terms of http://lists.llvm.org/pipermail/cfe-dev/2017-December/056314.html), which seems correct. And this affects all two code paths on which we exit the allocator call - both the `conservativeEvalCall` path and the `processCallExit` path (and ideally the future `evalCall` path).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5414 bytes
Desc: not available
More information about the cfe-commits