<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 6, 2015 at 6:00 PM, Tom Stellard <span dir="ltr"><<a href="mailto:tom@stellard.net" target="_blank">tom@stellard.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Mar 06, 2015 at 11:50:51AM -0800, Hans Wennborg wrote:<br>
> Tom, is this OK for 3.6.1?<br>
><br>
<br>
</span>This is fine with me as long as Richard approves.</blockquote><div><br></div><div>LGTM for 3.6.1.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
-Tom<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Thu, Mar 5, 2015 at 10:01 PM, Nico Weber <<a href="mailto:nicolasweber@gmx.de">nicolasweber@gmx.de</a>> wrote:<br>
> > Author: nico<br>
> > Date: Fri Mar 6 00:01:06 2015<br>
> > New Revision: 231451<br>
> ><br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=231451&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=231451&view=rev</a><br>
> > Log:<br>
> > Don't crash on non-public referenced dtors in toplevel classes.<br>
> ><br>
> > Fixes PR22793, a bug that caused self-hosting to fail after the innocuous<br>
> > r231254. See the bug for details.<br>
> ><br>
> > Modified:<br>
> > cfe/trunk/lib/Sema/SemaExpr.cpp<br>
> > cfe/trunk/test/CodeGenCXX/trivial-constructor-init.cpp<br>
> ><br>
> > Modified: cfe/trunk/lib/Sema/SemaExpr.cpp<br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=231451&r1=231450&r2=231451&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=231451&r1=231450&r2=231451&view=diff</a><br>
> > ==============================================================================<br>
> > --- cfe/trunk/lib/Sema/SemaExpr.cpp (original)<br>
> > +++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Mar 6 00:01:06 2015<br>
> > @@ -117,7 +117,7 @@ static AvailabilityResult DiagnoseAvaila<br>
> > case AR_Available:<br>
> > case AR_NotYetIntroduced:<br>
> > break;<br>
> > -<br>
> > +<br>
> > case AR_Deprecated:<br>
> > if (S.getCurContextAvailability() != AR_Deprecated)<br>
> > S.EmitAvailabilityWarning(Sema::AD_Deprecation,<br>
> > @@ -11859,8 +11859,11 @@ void Sema::MarkFunctionReferenced(Source<br>
> > } else if (CXXDestructorDecl *Destructor =<br>
> > dyn_cast<CXXDestructorDecl>(Func)) {<br>
> > Destructor = cast<CXXDestructorDecl>(Destructor->getFirstDecl());<br>
> > - if (Destructor->isDefaulted() && !Destructor->isDeleted())<br>
> > + if (Destructor->isDefaulted() && !Destructor->isDeleted()) {<br>
> > + if (Destructor->isTrivial() && !Destructor->hasAttr<DLLExportAttr>())<br>
> > + return;<br>
> > DefineImplicitDestructor(Loc, Destructor);<br>
> > + }<br>
> > if (Destructor->isVirtual() && getLangOpts().AppleKext)<br>
> > MarkVTableUsed(Loc, Destructor->getParent());<br>
> > } else if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(Func)) {<br>
> ><br>
> > Modified: cfe/trunk/test/CodeGenCXX/trivial-constructor-init.cpp<br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/trivial-constructor-init.cpp?rev=231451&r1=231450&r2=231451&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/trivial-constructor-init.cpp?rev=231451&r1=231450&r2=231451&view=diff</a><br>
> > ==============================================================================<br>
> > --- cfe/trunk/test/CodeGenCXX/trivial-constructor-init.cpp (original)<br>
> > +++ cfe/trunk/test/CodeGenCXX/trivial-constructor-init.cpp Fri Mar 6 00:01:06 2015<br>
> > @@ -32,3 +32,17 @@ static C c[4];<br>
> ><br>
> > int main() {<br>
> > }<br>
> > +<br>
> > +namespace PR22793 {<br>
> > +template <typename><br>
> > +struct foo {<br>
> > +protected:<br>
> > +// CHECK-NOT: _ZN7PR227933fooIiED2Ev<br>
> > + ~foo() = default;<br>
> > + friend void func();<br>
> > +};<br>
> > +<br>
> > +void func() { foo<int> f; }<br>
> > +<br>
> > +template struct foo<int>;<br>
> > +}<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > cfe-commits mailing list<br>
> > <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div></div>