[PATCH] D41250: [analyzer] Model implied cast around operator new().

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
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:

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
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

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2018-01-10 Thread Artem Dergachev via Phabricator via 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

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
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`

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
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

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2017-12-16 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2017-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
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

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
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