]> granicus.if.org Git - clang/commitdiff
code simplification
authorChris Lattner <sabre@nondot.org>
Sun, 4 Jan 2009 23:46:59 +0000 (23:46 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 4 Jan 2009 23:46:59 +0000 (23:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61654 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseExpr.cpp

index c5ed745d829ffbfef634709c0cfb03f14824aad8..8770bc286419b60b0fba0c5ad77e703276051781 100644 (file)
@@ -479,11 +479,8 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression) {
     // Turn a potentially qualified name into a annot_qualtypename or
     // annot_cxxscope if it would be valid.  This handles things like x::y, etc.
     if (getLang().CPlusPlus) {
-      TryAnnotateTypeOrScopeToken();
-    
-      // If TryAnnotateTypeOrScopeToken modified the current token, then tail
-      // recurse.
-      if (Tok.getKind() != tok::identifier)
+      // If TryAnnotateTypeOrScopeToken annotates the token, tail recurse.
+      if (TryAnnotateTypeOrScopeToken())
         return ParseCastExpression(isUnaryExpression);
     }