return ParsePostfixExpressionSuffix(Res);
case tok::coloncolon: // [C++] new-expression or [C++] delete-expression
+ // If the next token is neither 'new' nor 'delete', the :: would have been
+ // parsed as a scope specifier already.
if (NextToken().is(tok::kw_new))
return ParseCXXNewExpression();
else
(Tok.isNot(tok::identifier) || NextToken().isNot(tok::coloncolon)))
return false;
- // Don't parse ::new and ::delete as scope specifiers. It would only make
- // things a lot more complicated.
+ // ::new and ::delete aren'T nested-name-specifiers, so parsing the :: as
+ // a scope specifier only makes things more complicated.
if (Tok.is(tok::coloncolon) && (NextToken().is(tok::kw_new) ||
NextToken().is(tok::kw_delete)))
return false;