[cfe-commits] [PATCH] PR9903 - crash on typedef member non-compound-statement function body

Jordan Rose jordan_rose at apple.com
Fri Nov 9 11:04:45 PST 2012


I don't think you're going to get something better...the different kinds of function bodies are just too different to combine them, and skipping a try-statement (the ugliest one) is pretty different from parsing it proper. The one comment I have is that in your catch-parsing, you have a skip-to-lbrace-without-consuming and then immediately consume it, which could be combined into one call, but that's just style. (Oh, and we don't put braces around single-statement ifs.)

Do you have commit access, or do you need someone to commit for you?
Jordan


On Nov 9, 2012, at 9:29 , Brian Brooks <brooks.brian at gmail.com> wrote:

> take two...
> 
> On Fri, Nov 9, 2012 at 12:26 PM, Brian Brooks <brooks.brian at gmail.com> wrote:
> http://llvm.org/bugs/show_bug.cgi?id=9903
> 
> After looking at [dcl.fct.def.general] I added a few more test cases for ctor-initializer and tok::equal.
> 
> Is there a better way to skip a function-body?  I don't think my patch is very elegant.
> 
> Patch attached!  Thanks!
> 
> 
> <skip-typedefd-fn-body.patch>_______________________________________________
> 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/20121109/df2f498b/attachment.html>


More information about the cfe-commits mailing list