aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTDiagnostic.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp
index 31c1fbf1b7..a61abf7e34 100644
--- a/lib/AST/ASTDiagnostic.cpp
+++ b/lib/AST/ASTDiagnostic.cpp
@@ -1125,7 +1125,12 @@ class TemplateDiff {
TemplateDecl *FromTD, *ToTD;
Tree.GetNode(FromTD, ToTD);
- assert(Tree.HasChildren() && "Template difference not found in diff tree.");
+ if (!Tree.HasChildren()) {
+ // If we're dealing with a template specialization with zero
+ // arguments, there are no children; special-case this.
+ OS << FromTD->getNameAsString() << "<>";
+ return;
+ }
Qualifiers FromQual, ToQual;
Tree.GetNode(FromQual, ToQual);