[PATCH] D103750: [analyzer][WIP] Handle std::make_unique for SmartPtrModeling

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 7 12:38:54 PDT 2021


xazax.hun added a comment.

In D103750#2803516 <https://reviews.llvm.org/D103750#2803516>, @RedDocMD wrote:

> 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.

Did you consider trying to get it from `CXXInstanceCall::getCXXThisVal`? Usually, if you cannot access something you need, that is a bug in the analyzer. But I found that this is very rarely the case. Most of the callbacks are very well thought out and already gives access to most of the information you might want to access.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103750



More information about the cfe-commits mailing list