[cfe-commits] Patch: Fix an edge case where a right parenthesis is consumed early
rtrieu at google.com
Fri Jul 1 13:55:05 PDT 2011
Patch at revision 134258.
On Fri, Jul 1, 2011 at 11:20 AM, Douglas Gregor <dgregor at apple.com> wrote:
> On Jun 30, 2011, at 12:46 AM, Chandler Carruth wrote:
> On Wed, Jun 29, 2011 at 8:19 PM, Richard Trieu <rtrieu at google.com> wrote:
>> The recovery consumes the right parenthesis too early leading to Clang
>> thinking there is a parenthesis imbalance when there isn't one. This patch
>> should fix this issue.
> I'm not sure this is the correct fix.
> Above you change, when ParseExpressionList fails, we
> 'SkipUntil(tok::r_paren)', and then mark LHS as an error. Then fall through,
> and because LHS is now invalid, we 'SkipUntil(tok::r_paren)' a second time.
> I think the repeated calls are the problem here.
> Because we skip to the r_paren on an invalid LHS, I think we can change the
> code to not skip any tokens when ParseExpressionList fails, and just mark
> LHS as an error. Falling through, we'll skip to r_paren in the common
> This seems reasonable.
> - Doug
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits