]> granicus.if.org Git - clang/commitdiff
Replace a ConsumeAnyToken() call with ConsumeToken() when we know
authorDouglas Gregor <dgregor@apple.com>
Wed, 2 May 2012 14:34:16 +0000 (14:34 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 2 May 2012 14:34:16 +0000 (14:34 +0000)
we're looking at a normal token. Tiny positive impact -fsyntax-only
time for <rdar://problem/11004361>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155988 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/Parser.cpp

index 0d6f7dd897b15d1eb26a73eaa28ab5e907e1fe92..e406b184a7991c23d5aa1c275b42edd3ca73b6b9 100644 (file)
@@ -185,7 +185,7 @@ bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID,
 
 bool Parser::ExpectAndConsumeSemi(unsigned DiagID) {
   if (Tok.is(tok::semi) || Tok.is(tok::code_completion)) {
-    ConsumeAnyToken();
+    ConsumeToken();
     return false;
   }