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

Deep Majumder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 19 11:11:40 PDT 2021


RedDocMD added a comment.

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

> In D103750#2825342 <https://reviews.llvm.org/D103750#2825342>, @NoQ wrote:
>
>> 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.

What about this?


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