On Mon, May 13, 2013 at 6:22 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
================<br>
Comment at: lib/AST/ASTContext.cpp:1358<br>
@@ +1357,3 @@<br>
</div>+  unsigned Align = EltInfo.second / CharWidth;<br>
<div class="im">+  Width = llvm::RoundUpToAlignment(Width, Align);<br>
+  return std::make_pair(CharUnits::fromQuantity(Width),<br>
</div>----------------<br>
<div class="im">Richard Smith wrote:<br>
> This shouldn't be necessary; EltInfo.first / CharWidth should have been a multiple of EltInfo.second / CharWidth. Maybe convert this to an assertion?<br>
</div>This was added in revision 130242<br>
<a href="http://llvm.org/viewvc/llvm-project?view=revision&revision=130242" target="_blank">http://llvm.org/viewvc/llvm-project?view=revision&revision=130242</a><br>
<br>
in response to PR5637<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=5637" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=5637</a><br>
<br>
where Clang was changed to follow the behavior of GCC.  Otherwise, omitting this line will cause test/Sema/align-x86.c and test/Sema/align-x86-64.c to fail.</blockquote><div><br></div><div>Wow. That's impressively broken. OK then! </div>
</div>