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

Deep Majumder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 6 09:08:42 PDT 2021


RedDocMD added a comment.

In D103750#2801248 <https://reviews.llvm.org/D103750#2801248>, @xazax.hun wrote:

> You can always create a new symbol to represent the inner pointer. Something like this already happens, when you have a unique_ptr formal parameter and call get on it.

The way `handleGet` obtains a new symbol cannot really be used here since we do not have an `Expr` for the inner pointer at hand. `handleGet` does the following:

  C.getSValBuilder().conjureSymbolVal(
          CallExpr, C.getLocationContext(), Call.getResultType(), C.blockCount());

Since we have `CallExpr`, we can easily conjure up an `SVal`. But I don't see how I can do it similarly in this patch.


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