steakhal added a comment.

In D96976#2605313 <https://reviews.llvm.org/D96976#2605313>, @RedDocMD wrote:

> Talking on the mailing list, I  got a link on reinterpret_casting for 
> pointer-to-member: 
> https://timsong-cpp.github.io/cppwp/n4861/expr.reinterpret.cast#10
> The gist is that this sort of cast is only valid if we cast back to the 
> original type (that too with a caveat).

What is that caveat?

> Now currently there are three things that can be done:
>
> - Leave things the way they are - reinterpret_cast will cause an assertion to 
> fail
> - Never analyze reinterpret_cast - this is easy, just return nullptr for  
> PointerToMemberData
> - Properly model this - this would require possibly adding more information 
> in PointerToMember and a significantly complex logic to handle it.

Do you have anything specific in mind about implementing the 3rd option?
Why do you think it's //significantly complex//?

Leaving assertion failures is not an option.
IMO if this feature is important to you, then you should pursue the 3rd.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96976

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

Reply via email to