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.

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.

http://reviews.llvm.org/D3638



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to