This revision was automatically updated to reflect the committed changes.
Closed by commit rC322777: [analyzer] operator new: Model the cast of returned
pointer into object type. (authored by dergachev, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D41250
Files:
dcoughlin accepted this revision.
dcoughlin added a comment.
This looks good to me, as well.
https://reviews.llvm.org/D41250
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
NoQ updated this revision to Diff 129365.
NoQ added a comment.
Rebase.
Add a FIXME to bring back the cast in the conservative case.
https://reviews.llvm.org/D41250
Files:
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
NoQ updated this revision to Diff 129212.
NoQ added a comment.
In https://reviews.llvm.org/D41250#959755, @NoQ wrote:
> > I also noticed that `evalCast` from `void *` to `T *` is uncomfortable to
> > use because sometimes it transforms `{$x}` into `{T,
> > 0S32b, SymRegion{$x}}` even when `$x`
NoQ updated this revision to Diff 127549.
NoQ added a comment.
Rebase.
> I also noticed that `evalCast` from `void *` to `T *` is uncomfortable to use
> because sometimes it transforms `{$x}` into `{T, 0S32b,
> SymRegion{$x}}` even when `$x` is already of type `T *`. The form
> `{$x}` seems
xazax.hun accepted this revision.
xazax.hun added a comment.
This revision is now accepted and ready to land.
The code looks good to me. But the best way to verify these kinds of changes to
see how the results change on large projects after applying the patch.
https://reviews.llvm.org/D41250
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
NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs, eraman.
C++ overridable `operator new()` has the following prototype:
void *operator new(size_t size, user-defined arguments...);
The