diff options
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index c5ed745d82..8770bc2864 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -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); } |