vsavchenko added a comment.

In D99260#2650201 <https://reviews.llvm.org/D99260#2650201>, @steakhal wrote:

> I recommend splitting this into two. I would happily accept the part about 
> `std::data()`.
>
> IMO `std::addressof()` should be modelled via `evalCall` as a pure function, 
> instead of hacking it into the `InnerPtrChecker`.

It does make sense to split these in two, but I'm not so sure about `evalCall`. 
 It is definitely not something that `InnerPtrChecker` should be bothered with. 
 Another point is that `std::addressof` might be only one of the function 
receiving a non-const reference and not modifying it, so it would
be nice to have a place in this checker where such exception is made.

> It is overloaded to accept `const T&` as well, so the comment about 
> //"std::addressof function accepts a non-const reference as an argument"// is 
> not entirely true.

But it has a `T &` overload as well, and this is the one causing the FP.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99260

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

Reply via email to