fix PR4452, a crash on invalid.  The error recovery is still terrible in this case
but at least we don't crash :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74264 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index 68964e9..d89f1e1 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -85,8 +85,10 @@
         = Actions.ActOnDependentTemplateName(TemplateKWLoc,
                                              *Tok.getIdentifierInfo(),
                                              Tok.getLocation(), SS);
-      AnnotateTemplateIdToken(Template, TNK_Dependent_template_name,
-                              &SS, TemplateKWLoc, false);
+      if (AnnotateTemplateIdToken(Template, TNK_Dependent_template_name,
+                                  &SS, TemplateKWLoc, false))
+        break;
+      
       continue;
     }
     
@@ -179,7 +181,9 @@
         // because some clients (e.g., the parsing of class template
         // specializations) still want to see the original template-id
         // token.
-        AnnotateTemplateIdToken(Template, TNK, &SS, SourceLocation(), false);
+        if (AnnotateTemplateIdToken(Template, TNK, &SS, SourceLocation(),
+                                    false))
+          break;
         continue;
       }
     }