[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 31 14:30:56 PDT 2018

NoQ added a comment.

In https://reviews.llvm.org/D49627#1176326, @baloghadamsoftware wrote:

> How much different is a correct `this`-argument construction context from real argument construction contexts?

It's identified in a similar manner; this patch pretty much already shows how to identify it. It carries the same amount of information: what call, what argument.

The tricky part is to come up with a good description for the target region and make sure it's actually used when the operator call is inlined.  It would probably be a simple `CXXTempObjectRegion` because we don't have a `VarDecl` to make a `VarRegion`.

Then we might need to proactively bind in in the Store to `CXXThisRegion` of the call, and for that purpose we might need a crystal ball to guess the future `StackFrameContext`, like in case of arguments.

We still need to invalidate the target region if operator call is conservatively evaluated, like in case of arguments, because the destructor will use the updated object.


More information about the cfe-commits mailing list