RedDocMD added a comment. In D96976#2605815 <https://reviews.llvm.org/D96976#2605815>, @steakhal wrote:
> What is that caveat? The second point in the link I gave above. > Do you have anything specific in mind about implementing the 3rd option? > Why do you think it's //significantly complex//? The modelling is not so complex. We need to store in the pointer-to-member a bool to remember that it was reinterpret_casted, and a CXXRecordDecl pointer to store where it was reinterpret_casted from. If it is reinterpret_casted back properly, then these are reset. If we do further reinterpret_casting or static_cast on this, then we can store in a bool that the pointer-to-member is unsafe to de-reference. The problem is utilizing this fact (that pointer-to-member is safe or not to de-reference). This, I reckon, is a big refactor. @steakhal, @vsavchenko, @NoQ what do you think? 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