+ Anders Carlsson who originally wrote the code (apparently he's not on phabricator). Also the summary of this review should be read as "Prevent crash if class destructor is not accessible".
On Wed, Jun 17, 2015 at 10:30 AM, Davide Italiano <[email protected]> wrote: > Hi rjmccall, > > Fixes > > struct A { > ~A(); > }; > > struct B { > A a; > }; > > struct C { > union { > B b; > }; > > ~C() noexcept; > }; > > C::~C() noexcept {} > > REPOSITORY > rL LLVM > > http://reviews.llvm.org/D10508 > > Files: > lib/CodeGen/CGClass.cpp > > Index: lib/CodeGen/CGClass.cpp > =================================================================== > --- lib/CodeGen/CGClass.cpp > +++ lib/CodeGen/CGClass.cpp > @@ -1293,6 +1293,9 @@ > const CXXRecordDecl *BaseClassDecl, > const CXXRecordDecl *MostDerivedClassDecl) > { > + if (!BaseClassDecl->hasSimpleDestructor()) > + return false; > + > // If the destructor is trivial we don't have to check anything else. > if (BaseClassDecl->hasTrivialDestructor()) > return true; > > EMAIL PREFERENCES > http://reviews.llvm.org/settings/panel/emailpreferences/ _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
