[PATCH] PR13824 warn if reinterpret_cast used for up/downcast
Alexander Zinenko
ftynse at gmail.com
Thu Mar 21 04:15:50 PDT 2013
Thank you again, John!
Here is an updated patch with extra tests. Could you (or somebody else)
please commit it?
On 21 March 2013 02:18, John McCall <rjmccall at apple.com> wrote:
>
> Please add a test case where code tries to reinterpret-cast an
> incompletely-defined struct. (We just want to ensure that we don't crash
> for this.) This means putting a reinterpret_cast into a type expression in
> class context (not within a member function), e.g.
>
> struct A {
> decltype(reinterpret_cast<A*>((B*) 0)) x;
> };
>
> With that, this patch looks fine; feel free to commit.
>
> John.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130321/18f56b42/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13824quiet.patch
Type: application/octet-stream
Size: 17139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130321/18f56b42/attachment.obj>
More information about the cfe-commits
mailing list