<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks, r218520<div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 25, 2014, at 5:32 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" class="">richard@metafoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Sorry for the delay, LGTM, please go ahead and commit.</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Sep 19, 2014 at 4:03 PM, Ben Langmuir <span dir="ltr" class=""><<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><div class=""><div class="h5"><blockquote type="cite" class=""><div class="">On Sep 16, 2014, at 5:40 PM, Ben Langmuir <<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>> wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 16, 2014, at 5:08 PM, John McCall <<a href="mailto:rjmccall@apple.com" target="_blank" class="">rjmccall@apple.com</a>> wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class="">On Sep 16, 2014, at 5:06 PM, Ben Langmuir <<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><div style="word-wrap:break-word" class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 16, 2014, at 1:25 PM, John McCall <<a href="mailto:rjmccall@apple.com" target="_blank" class="">rjmccall@apple.com</a>> wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class="">On Sep 16, 2014, at 12:54 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank" class="">richard@metafoo.co.uk</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 16, 2014 at 12:47 PM, John McCall <span dir="ltr" class=""><<a href="mailto:rjmccall@apple.com" target="_blank" class="">rjmccall@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class="">On Sep 16, 2014, at 12:11 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank" class="">richard@metafoo.co.uk</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 16, 2014 at 11:45 AM, John McCall <span dir="ltr" class=""><<a href="mailto:rjmccall@apple.com" target="_blank" class="">rjmccall@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On Sep 15, 2014, at 9:47 AM, Ben Langmuir <<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>> wrote:<br class="">
> Hi John,<br class="">
><br class="">
> This patch fixes the assertion failure I talked to you about in Objective C++ codegen. It turned out to have nothing to do with templates.<br class="">
><br class="">
> Fix an assertion failure trying to emit a trivial destructor in ObjC++<br class="">
><br class="">
> If a base class declares a destructor, we will add the implicit<br class="">
> destructor for the subclass in<br class="">
> ActOnFields -> AddImplicitlyDeclaredMembersToClass<br class="">
><br class="">
> But in Objective C++, we did not compute whether we have a trivial<br class="">
> destructor until after that in<br class="">
> CXXRecordDecl::completeDefinition()<br class="">
><br class="">
> This was leading to a mismatch between the class, which thought it had<br class="">
> no trivial destructor, and the CXXDestructorDecl, which considered<br class="">
> itself trivial.<br class="">
<br class="">
</div>I feel like hasTrivialDestructor should return the right value here. I understand (and am saddened by) the hack about not setting PlainOldData until completeDefinition, but maybe we can set/clear the rest of the bits eagerly?</blockquote><div class=""><br class=""></div><div class="">Why do we have to delay setting the PlainOldData flag?</div></div></div></div>
</blockquote></div><br class=""></div></div><div class="">There is a diagnostic which wants to warn about structs that are only POD in non-ARC modes.</div></div></blockquote><div class=""><br class=""></div><div class="">Thanks, I suspected something along those lines. Perhaps we could track both properties and still perform the calculation eagerly:</div><div class=""><br class=""></div><div class="">- bool isPOD() const { return data().PlainOldData; }</div><div class="">+ bool isPOD() const { return data().PlainOldData && !data().HasARCObjectMember; }<br class=""></div><div class="">+ bool wouldHaveBeenPODIfItWerentForYouMeddlingKids() const { return data().PlainOldData; }</div></div></div></div>
</blockquote></div><br class=""><div class="">That works for me, or we could even give it its own bit in the definition data; it’s not like we aren’t tracking a number of other things there for similar purposes.</div><div class=""><br class=""></div><div class="">John.</div></div></div></blockquote><br class=""></div><div class="">John and I took a look and it turns out we killed the warning in question as part of removing -Warc-abi. I’ve attached an updated patch that just eagerly sets these bits in addedMember so we will get the correct value inside AddImplicitlyDeclaredMembersToClass.</div></div></blockquote><div class=""><br class=""></div></div>Looks great to me; thanks, Ben.<div class=""><br class=""></div><div class="">John.</div></div></div></blockquote><br class=""></div><div class="">Thanks John.</div><div class=""><br class=""></div><div class="">Richard, did you have any other feedback, or shall I commit?</div></div></div></blockquote><div class=""><br class=""></div></div></div><div class="">ping</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class="">Ben</div></div></div></blockquote></div><br class=""></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>