[cfe-commits] [PATCH] Fix PR14514: Call destructor automatically after a throw

WenHan Gu (谷汶翰) wenhan.gu at mediatek.com
Mon Jan 7 18:15:56 PST 2013


Hi cfe-committers,

For late wish, Merry Christmas and Happy New Year!

Could someone take a look at this?
This patch fix array exception destruction bug, and w/o broking any test.

Thanks!

> -----Original Message-----
> From: WenHan Gu (谷汶翰)
> Sent: Wednesday, December 26, 2012 3:55 PM
> To: WenHan Gu (谷汶翰); 'Eli Friedman'
> Cc: 'John McCall'; 'anton at korobeynikov.info'; 'andersca at mac.com';
> 'cfe-commits at cs.uiuc.edu'
> Subject: RE: [PATCH] Fix PR14514: Call destructor automatically after a throw
> 
> Ping?
> 
> Any wrong on this patch? Or any suggestion?
> This patch fix array exception destruction bug, and w/o broking any test.
> 
> Thanks.
> 
> > -----Original Message-----
> > From: WenHan Gu (谷汶翰)
> > Sent: Tuesday, December 18, 2012 10:47 AM
> > To: 'Eli Friedman'
> > Cc: John McCall; anton at korobeynikov.info; andersca at mac.com;
> > cfe-commits at cs.uiuc.edu
> > Subject: RE: [PATCH] Fix PR14514: Call destructor automatically after
> > a throw
> >
> > I move the logic to caller, which won't push cleanup if not destruct-able.
> > R4 attached.
> >
> > > -----Original Message-----
> > > From: Eli Friedman [mailto:eli.friedman at gmail.com]
> > > Sent: Tuesday, December 18, 2012 10:15 AM
> > > To: WenHan Gu (谷汶翰)
> > > Cc: John McCall; anton at korobeynikov.info; andersca at mac.com;
> > > cfe-commits at cs.uiuc.edu
> > > Subject: Re: [PATCH] Fix PR14514: Call destructor automatically
> > > after a throw
> > >
> > > On Mon, Dec 17, 2012 at 5:53 PM, WenHan Gu (谷汶翰)
> > > <wenhan.gu at mediatek.com> wrote:
> > > > OK, thanks.
> > > > Patch set 3 uploaded.
> > >
> > > @@ -1367,6 +1367,9 @@ static void
> > > emitPartialArrayDestroy(CodeGenFunction &CGF,
> > >      type = arrayType->getElementType();
> > >    }
> > >
> > > +  if (type.isDestructedType() == QualType::DK_none)
> > > +    return; // Check again for nest array
> > > +
> > >
> > > That doesn't help; you're still pushing the cleanup.
> > >
> > > -Eli

************* Email Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR14514_r4.patch
Type: application/octet-stream
Size: 3599 bytes
Desc: PR14514_r4.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130108/34e7b842/attachment.obj>


More information about the cfe-commits mailing list