[cfe-commits] [PATCH] Fix crash with invalid lambda trailing return type
Richard Smith
richard at metafoo.co.uk
Thu Aug 30 06:15:25 PDT 2012
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.
On Wed, Aug 29, 2012 at 6:12 PM, Aaron Ballman <aaron at aaronballman.com>wrote:
> > On Tue, Aug 28, 2012 at 4:25 AM, Aaron Ballman <aaron at aaronballman.com>
> > wrote:
> >>
> >> This patch addresses PR13652, where a missing trailing return type was
> >> causing a seg fault. I've also included a test case demonstrating the
> >> fix.
>
> This is a revised version of the same patch. Instead of early
> returning, we create an empty type result and continue parsing. This
> should allow for better error recovery.
>
> ~Aaron
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120830/c0ad11c9/attachment.html>
More information about the cfe-commits
mailing list