[PATCH] Improved error recovery for _Pragma

Aaron Ballman aaron at aaronballman.com
Fri Mar 13 11:03:59 PDT 2015


On Fri, Mar 13, 2015 at 1:57 PM, Rachel Craik <rcraik at ca.ibm.com> wrote:
> With the proposed patch, the first case is handled exactly the same as the current trunk. In regards to the second case, a `BalancedDelimiterTracker` //could // (in theory) be used instead to eat all tokens until the closing ')', if it exists. However, `_Pragma` is handled by the preprocessor, and I believe `BalancedDelimiterTracker` can only used from within the parser.
>
> With this patch I have tried to follow the style used elsewhere in the preprocessor.

There are quite a few places in the preprocessor where a
BalancedDelimiterTracker would be highly beneficial. Perhaps that
class can be abstracted so that it's usable by the parser and the
preprocessor, and then used here (and elsewhere, as follow-on
patches)?

~Aaron

>
>
> http://reviews.llvm.org/D8308
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list