<div dir="ltr">LGTM, thanks!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 30, 2014 at 7:58 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, May 29, 2014 at 10:50 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>

> On Tue, May 27, 2014 at 6:57 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
> wrote:<br>
>><br>
>> The exception-declaration for a function-try-block cannot redeclare a<br>
>> function parameter. One of our existing test cases was XFAILed because<br>
>> of this. This patch is an attempt to fix the issue and un-XFAIL the<br>
>> test.<br>
>><br>
>> I am getting this from [basic.lookup.unqual]p15, which says,<br>
>><br>
>> A name used in the handler for a function-try-block (Clause 15) is<br>
>> looked up as if the name was used in the outermost block of the<br>
>> function definition. In particular, the function parameter names shall<br>
>> not be redeclared in the exception-declaration nor in the outermost<br>
>> block of a handler for the function-try-block.<br>
><br>
><br>
> This looks like it might do the wrong thing for a function nested within<br>
> another function:<br>
><br>
> void f(int i) {<br>
>   struct S {<br>
>     void g() try {} catch (int i) {}; // shouldn't diagnose this, but I<br>
> think you will<br>
>   };<br>
> }<br>
><br>
> The way we generally handle this is in IdentifierResolver::isDeclInScope,<br>
> and that's the right place for this fix. You should be able to detect a<br>
> catch of a function try block by looking at the flags on the Scope.<br>
<br>
</div></div>That simplifies things, thank you for the information! New patch<br>
attached, along with updated test case.<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span></blockquote></div><br></div>