<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Mar 7, 2014, at 7:36 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><br><div><div>On Mar 7, 2014, at 18:38 , David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Fri, Mar 7, 2014 at 6:22 PM, Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>> wrote:<br><blockquote type="cite">Author: kremenek<br>Date: Fri Mar  7 20:22:32 2014<br>New Revision: 203336<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=203336&view=rev">http://llvm.org/viewvc/llvm-project?rev=203336&view=rev</a><br>Log:<br>[-Wunreachabe-code] Don't warn about unreachable destructors for temporaries.<br></blockquote><br>Can a noreturn function exit by throwing? If so then the dtors are all<br>perfectly reachable. (and I guess your change makes that happen, so it<br>might just be correct without refinement)<br></div></blockquote></div><br><div>It looks like "yes". C++11 [dcl.attr.noreturn]p2: [ Note: The function may terminate by throwing an exception. — end note ]</div><div><br></div><div>Jordan</div></div></blockquote><br><div>Right.  If we want to model this the approach I would take is to modify the CFG (possibly as an optional variant).  The heuristics here only prune code that has been computed to be unreachable. </div></body></html>