On Jan 22, 2013, at 2:58 PM, Alexander Zinenko <[email protected]> wrote: > The attached patch addresses http://llvm.org/bugs/show_bug.cgi?id=13824. It > emits a warning if reinterpret_cast is actually used to perform an upcast or > a downcast which might lead to segfault in some cases.
In most cases, this is actually safe, and I don't feel comfortable saying it's unreasonable for code to rely on that. This warning should only fire when the base subobject is in a virtual base or at a nonzero static offset. You can use a CXXBasePaths object with Sema::IsDerivedFrom in order to determine the subobject access path. John.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
