[cfe-commits] [PATCH] -fcatch-undefined-behavior: catch misalignment, bad reference bindings, bad 'this' pointers in member calls

Richard Smith richard at metafoo.co.uk
Thu Aug 23 18:45:21 PDT 2012


Committed as r162523 after off-list review.

On Thu, Aug 23, 2012 at 10:56 AM, Richard Smith <
reviews at llvm-reviews.chandlerc.com> wrote:

> This patch teaches -fcatch-undefined-behavior to catch cases where a
> reference is bound to a glvalue which doesn't point to storage of the right
> size and alignment, and likewise for 'this' pointers. It also adds the
> alignment check to the existing checks for loads and stores.
>
> Clang and LLVM's tests are now clean under these new checks, except for
> TypeLoc alignment.
>
> http://llvm-reviews.chandlerc.com/D24
>
> Files:
>   test/CodeGenCXX/catch-undef-behavior.cpp
>   test/CodeGen/catch-undef-behavior.c
>   lib/CodeGen/CGExprScalar.cpp
>   lib/CodeGen/CGExpr.cpp
>   lib/CodeGen/CGExprAgg.cpp
>   lib/CodeGen/CGExprCXX.cpp
>   lib/CodeGen/CodeGenFunction.h
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120823/8c03798f/attachment.html>


More information about the cfe-commits mailing list