vsavchenko added a comment.

In D97183#2699336 <https://reviews.llvm.org/D97183#2699336>, @steakhal wrote:

> In D97183#2699080 <https://reviews.llvm.org/D97183#2699080>, @RedDocMD wrote:
>
>> For the following function:
>>
>>   void foo(std::unique_ptr<A> P) {
>>     A* praw = P.get();
>>     A* other = praw;
>>     if (other) {}
>>     P->foo();
>>   }
>>
>> Where do we expect a note? Where `praw` is initialized, where `other` is 
>> initialized or both?
>
> I would expect no notes at all, since there is no bug.

According to the existing analyzer logic, there is a bug.  If you check `other` 
for null, we can conclude that there are circumstances when it is null indeed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97183

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

Reply via email to