<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 22, 2017 at 9:23 PM, Reid Kleckner via Phabricator via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">rnk accepted this revision.<br>
rnk added a comment.<br>
This revision is now accepted and ready to land.<br></blockquote><div><br></div><div>311561, thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Looks good!<br>
<span class="gmail-"><br>
<br>
<br>
================<br>
Comment at: test/Sema/warn-unreachable-ms.<wbr>c:42<br>
+  }<br>
+}<br>
----------------<br>
</span><span class="gmail-">rnk wrote:<br>
> Can we add a test to exercise that this builds the right CFG?<br>
> ```<br>
> __try {<br>
>   __try {<br>
>     f();<br>
>   } __except(1) {<br>
>     __leave; // should exit outer try<br>
>   }<br>
>   __leave;<br>
>   f(); // expected-warning{{never be executed}}<br>
> } __except(1) {<br>
> }<br>
> ```<br>
> Sure. Did you intentionally put two __leaves in there, or do you only want the one in the inner __except?<br>
<br>
</span>I think both are required to trigger the warning in case f() doesn't throw, but I could be wrong.<br></blockquote><div><br></div><div>Oh, that way round. But if f() throws and I omit the first __leave, then the __except() block will just do nothing and fall through to the second __leave and we'll still get the warning, right? </div></div><br></div></div>