eliminate a call to NextToken() when parsing ::foo

llvm-svn: 91738
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index f521bc3..51c5670 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -680,9 +680,10 @@
     // Otherwise, not a typename.
     return TPResult::False();
 
-  case tok::coloncolon:     // ::foo::bar
-    if (NextToken().is(tok::kw_new) ||    // ::new
-        NextToken().is(tok::kw_delete))   // ::delete
+  case tok::coloncolon: {    // ::foo::bar
+    const Token &Next = NextToken();
+    if (Next.is(tok::kw_new) ||    // ::new
+        Next.is(tok::kw_delete))   // ::delete
       return TPResult::False();
 
     // Annotate typenames and C++ scope specifiers.  If we get one, just
@@ -691,7 +692,8 @@
       return isCXXDeclarationSpecifier();
     // Otherwise, not a typename.
     return TPResult::False();
-
+  }
+      
     // decl-specifier:
     //   storage-class-specifier
     //   type-specifier
@@ -699,7 +701,6 @@
     //   'friend'
     //   'typedef'
     //   'constexpr'
-
   case tok::kw_friend:
   case tok::kw_typedef:
   case tok::kw_constexpr: