RedDocMD added a comment.

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). 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.

The first two are trivially done. I would like to know if it is worth following 
the third - especially since it is a really obscure feature.
@vsavchenko, @NoQ, @steakhal what do you think should be done?


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