<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 22, 2014 at 6:42 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Okay, I think I understand now. If the first dead statement is the first expression in a return statement, and then there's a temporary destructors block, and then the return statement, then we'd still want to treat that as part of the return statement. And that happens right now because we don't optimize out the case with no control flow.<br>

<br>
I'm worried, though, that this will catch something in a dead else block and go sailing off the end to look for a return statement, build a parent map, and then not actually find anything (of course). It seems like a fair amount of extra work. Then again, we have already decided to emit a diagnostic at this point, so I guess it's okay.<br>
</blockquote><div><br></div><div>That was the exact line of thought I went through, too... I also tried to come up with a better way, but didn't have a good idea...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<a href="http://reviews.llvm.org/D3638" target="_blank">http://reviews.llvm.org/D3638</a><br>
<br>
<br>
</blockquote></div><br></div></div>