<div dir="ltr"><div><span style="color:rgb(34,34,34)">> Do we have some corresponding dead code warning? I'm not exactly in</span><br></div>> favor of this...<br><div><br></div><div>If you compile with -Wunreachable-code (which is not on by default) then there will be an unreachable code warning for the return statement. Is that along the lines of what you want? (in that case maybe nothing needs to be done here?).</div>




<div><br></div><div>> Also, why has this code moved ~200 lines further down? I think this is<br>> changing the semantics of the diagnostic.<br><div></div></div><div><br></div><div>I originally moved it down because <span style="font-family:arial,sans-serif;font-size:13px">DiagRuntimeBehavior requires a non-null statement (2nd parameter) to be passed in for the reachability test to be run before displaying the diagnostic. Where the diagnostic was previously, I wouldn't have access to the return statement (Stmt) which is in the variable "Result". The only thing I would have would be RetValExp, however, using that fails when trying to detect a return in a void function. </span></div>


<div><br></div></div>