Make the parser handle ::new and ::delete correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60421 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index d995b88..5d790fa 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -38,6 +38,12 @@
       (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.
+  if (Tok.is(tok::coloncolon) && (NextToken().is(tok::kw_new) ||
+                                  NextToken().is(tok::kw_delete)))
+    return false;
+
   if (Tok.is(tok::annot_cxxscope)) {
     SS.setScopeRep(Tok.getAnnotationValue());
     SS.setRange(Tok.getAnnotationRange());