diff options
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index 6e79b85a99..cfc07b8b4e 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -844,8 +844,9 @@ FormatDiagnostic(const char *DiagStr, const char *DiagEnd, const char *ArgumentEnd = Argument + ArgumentLen; const char *Pipe = ScanFormat(Argument, ArgumentEnd, '|'); - // Print the tree. - if (getDiags()->PrintTemplateTree) { + // Print the tree. If this diagnostic already has a tree, skip the + // second tree. + if (getDiags()->PrintTemplateTree && Tree.empty()) { TDT.PrintFromType = true; TDT.PrintTree = true; getDiags()->ConvertArgToString(Kind, val, |