RedDocMD added a comment.

In D103750#2803499 <https://reviews.llvm.org/D103750#2803499>, @NoQ wrote:

> Ugh, this entire `checkBind` hack was so unexpected that I didn't even 
> recognize `evalCall`. What prevents you from doing everything in `evalCall`? 
> No state traits, no nothing, just directly take the this-region and attach 
> the value to it?

Because in `evalCall`, I don't have access to the `ThisRegion`. At least I 
think I don't.
So we have a statement like `auto a = std::make_unique<int>(100)`. In 
`evalCall` I get a `CallEvent` corresponding to `std::make_unique<int>(100)`. 
Using `Call.getOriginExpr()` I can get the LHS. But that's only the `Expr`, not 
the `MemRegion`.  Unlike in a regular constructor call or method call, where 
`ThisRegion` can easily be obtained from the `Call`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103750/new/

https://reviews.llvm.org/D103750

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to