[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: Re: [PATCH] Fix parsing comma in default arguments.
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2013-05-19 9:54:27
Message-ID: 11132262.X0vUQ96L4C () gargamel
[Download RAW message or body]
On Sunday 19 May 2013 11:45:57 Olivier Goffart wrote:
> Hi,
>
> I attached a patch to the bug http://llvm.org/bugs/show_bug.cgi?id=14486
Wrong link. I meant
http://llvm.org/bugs/show_bug.cgi?id=13657
Sorry for the confusion.
> The problem is that a comma can be both the separation between template
> parameter, or the separation between function arguments.
>
> GCC tries to fully parse the part after the comma to see if it can be the
> separation between function argument:
> http://code.woboq.org/gcc/gcc/cp/parser.c.html#23442
>
> But I was too lazy to do the same (because the function like
> TryParseParameterDeclarationClause or TryParseDeclarationSpecifier are not
> good enough and stop too early.)
> So Instead I used some heuristics in the existence of a '=' before the
> possible closing '>' as further argument need to find a comma.
>
> I am not 100% sure that this cover all the cases, but i could not find an
> example that breaks.
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic