<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Logan Chien</b> <span dir="ltr"><<a href="mailto:tzuhsiang.chien@gmail.com">tzuhsiang.chien@gmail.com</a>></span><br>
Date: Thu, Oct 18, 2012 at 11:20 PM<br>Subject: Re: [cfe-commits] Bug 11709 Fix: va_list on ARM is not following AAPCS 7.1.4<br>To: Eli Friedman <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>><br>
<br><br>Thanks for your review.<br><br>I have added new test to test/SemaCXX/builtins-arm.cpp to<br>specify the error message when PerformCopyInitialization fails.<br><br>BTW, is the InitializedEntity related code correct? I hope I can<br>
get a modifiable Lvalue reference after initialization (not a copy<br>of the value in the structure.) I'm not very confident with this.<br><br>Thanks.<br><br>Sincerely,<br>Logan<div class="HOEnZb"><div class="h5"><br>
<br><div class="gmail_quote">On Thu, Oct 18, 2012 at 6:11 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thu, Oct 18, 2012 at 1:40 AM, Logan Chien <<a href="mailto:tzuhsiang.chien@gmail.com" target="_blank">tzuhsiang.chien@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Here's another attempt to solve __builtin_va_arg issue.<br>
> In this patch, there is a special check for C++ and va_list as<br>
> record type:<br>
><br>
> } else if (VaListType->isRecordType() && getLangOpts().CPlusPlus) {<br>
> // If va_list is a record type and we are compiling under C++ mode,<br>
> // then we should check the argument by copy assignment operator.<br>
> InitializedEntity Entity<br>
> = InitializedEntity::InitializeParameter(Context,<br>
> Context.getLValueReferenceType(VaListType), false);<br>
> ExprResult Init = PerformCopyInitialization(Entity, SourceLocation(),<br>
> E);<br>
> if (Init.isInvalid())<br>
> return ExprError();<br>
> E = Init.takeAs<Expr>();<br>
><br>
> With this patch, I can get the same assembly result. However, I'm not<br>
> familiar with InitializedEntity. Please have a look.<br>
<br>
</div>Please include a testcase where PerformCopyInitialization fails.<br>
<span><font color="#888888"><br>
-Eli<br>
</font></span></blockquote></div><br>
</div></div></div><br>