On Wed, May 2, 2012 at 7:34 AM, Douglas Gregor <[email protected]> wrote:

> Author: dgregor
> Date: Wed May  2 09:34:16 2012
> New Revision: 155988
>
> URL: http://llvm.org/viewvc/llvm-project?rev=155988&view=rev
> Log:
> Replace a ConsumeAnyToken() call with ConsumeToken() when we know
> we're looking at a normal token. Tiny positive impact -fsyntax-only
> time for <rdar://problem/11004361>.
>

If we no longer intend to ensure ConsumeCodeCompletionToken() is called to
consume a code_completion token, is there any value in keeping it around as
a separate function?

(I also wonder why we have a separate ConsumeStringToken function, given
that it does nothing special since translation phase 6 is performed
manually within the parser...)


> Modified:
>    cfe/trunk/lib/Parse/Parser.cpp
>
> Modified: cfe/trunk/lib/Parse/Parser.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=155988&r1=155987&r2=155988&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Parse/Parser.cpp (original)
> +++ cfe/trunk/lib/Parse/Parser.cpp Wed May  2 09:34:16 2012
> @@ -185,7 +185,7 @@
>
>  bool Parser::ExpectAndConsumeSemi(unsigned DiagID) {
>   if (Tok.is(tok::semi) || Tok.is(tok::code_completion)) {
> -    ConsumeAnyToken();
> +    ConsumeToken();
>     return false;
>   }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to