Hi Eli, Actually, I have thought this assertion issue before modifying it. However, I think, checking destruct-able in one callee is much simple and clear than checking it in *all* caller, right?
If this has some design consideration, please let me know. Thanks. From: Eli Friedman [mailto:[email protected]] Sent: Tuesday, December 18, 2012 9:07 AM To: WenHan Gu (谷汶翰) Cc: [email protected]; [email protected]; [email protected]; [email protected] Subject: Re: [PATCH] Fix PR14514: Call destructor automatically after a throw On Sun, Dec 16, 2012 at 8:57 PM, WenHan Gu (谷汶翰) <[email protected]<mailto:[email protected]>> wrote: Hi committers, This patch fix PR14514: Array of class type didn't call destructor automatically after a throw. http://llvm.org/bugs/show_bug.cgi?id=14514 Please have a look. Thanks! - assert(!dtor->isTrivial()); + if (dtor->isTrivial()) + return; Something has gone wrong in the other logic in your patch if you need this change. We shouldn't push cleanups for elements of an array with a trivially destructible type. You should probably be calling QualType::isDestructedType somewhere. -Eli
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
