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

Deep Majumder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 18 10:45:26 PDT 2021


RedDocMD added a comment.

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

> In D103750#2823741 <https://reviews.llvm.org/D103750#2823741>, @RedDocMD wrote:
>
>> I would suppose that constructor calls are properly handled. (ie, member constructors are called properly).
>
> Do the above tests pass when your new `evalCall` modeling is enabled?

The analyzer doesn't seem to be able to make up its mind.

  member-constructor.cpp:15:5: warning: FALSE [debug.ExprInspection]
      clang_analyzer_eval(*P->p == 0);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  member-constructor.cpp:15:25: note: Assuming the condition is false
      clang_analyzer_eval(*P->p == 0);
                          ^~~~~~~~~~
  member-constructor.cpp:15:5: note: FALSE
      clang_analyzer_eval(*P->p == 0);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  member-constructor.cpp:15:5: warning: TRUE [debug.ExprInspection]
      clang_analyzer_eval(*P->p == 0);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  member-constructor.cpp:15:25: note: Assuming the condition is true
      clang_analyzer_eval(*P->p == 0);
                          ^~~~~~~~~~
  member-constructor.cpp:15:5: note: TRUE
      clang_analyzer_eval(*P->p == 0);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2 warnings generated.


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