r203336 - [-Wunreachabe-code] Don't warn about unreachable destructors for temporaries.

Jordan Rose jordan_rose at apple.com
Fri Mar 7 19:36:03 PST 2014


On Mar 7, 2014, at 18:38 , David Blaikie <dblaikie at gmail.com> wrote:

> On Fri, Mar 7, 2014 at 6:22 PM, Ted Kremenek <kremenek at apple.com> wrote:
>> Author: kremenek
>> Date: Fri Mar  7 20:22:32 2014
>> New Revision: 203336
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=203336&view=rev
>> Log:
>> [-Wunreachabe-code] Don't warn about unreachable destructors for temporaries.
> 
> Can a noreturn function exit by throwing? If so then the dtors are all
> perfectly reachable. (and I guess your change makes that happen, so it
> might just be correct without refinement)

It looks like "yes". C++11 [dcl.attr.noreturn]p2: [ Note: The function may terminate by throwing an exception. — end note ]

Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140307/5cbdf000/attachment.html>


More information about the cfe-commits mailing list