This isn't the right way to fix this issue; this patch is just pretending that there wasn't a trailing return type specified, and will give bogus follow-on errors if a return type can't be deduced. The right approach is to take the parameter declarations from the Declarator rather than from the FunctionTypeLoc (which won't have been filled in if the type is invalid); r162904.<div>

<br></div><div><div><div class="gmail_quote">On Wed, Aug 29, 2012 at 6:12 PM, 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><div>> On Tue, Aug 28, 2012 at 4:25 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>><br>
> wrote:<br>
>><br>
>> This patch addresses PR13652, where a missing trailing return type was<br>
>> causing a seg fault.  I've also included a test case demonstrating the<br>
>> fix.<br>
<br>
</div></div>This is a revised version of the same patch.  Instead of early<br>
returning, we create an empty type result and continue parsing.  This<br>
should allow for better error recovery.<br>
<span><font color="#888888"><br>
~Aaron<br>
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>