Committed as r162523 after off-list review.<br><br><div class="gmail_quote">On Thu, Aug 23, 2012 at 10:56 AM, Richard Smith <span dir="ltr"><<a href="mailto:reviews@llvm-reviews.chandlerc.com" target="_blank">reviews@llvm-reviews.chandlerc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
<br>
Clang and LLVM's tests are now clean under these new checks, except for TypeLoc alignment.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D24" target="_blank">http://llvm-reviews.chandlerc.com/D24</a><br>
<br>
Files:<br>
test/CodeGenCXX/catch-undef-behavior.cpp<br>
test/CodeGen/catch-undef-behavior.c<br>
lib/CodeGen/CGExprScalar.cpp<br>
lib/CodeGen/CGExpr.cpp<br>
lib/CodeGen/CGExprAgg.cpp<br>
lib/CodeGen/CGExprCXX.cpp<br>
lib/CodeGen/CodeGenFunction.h<br>
</blockquote></div><br>