aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Diagnostic.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2012-07-13 21:18:32 +0000
committerRichard Trieu <rtrieu@google.com>2012-07-13 21:18:32 +0000
commit5561977175c04dc2bae53b0f577a5c1ca83b96ff (patch)
tree8e421fe27bd32c3563103a304b363ac3a7d347c5 /lib/Basic/Diagnostic.cpp
parentf195f2cacf149286232d66578fad3370efa5f567 (diff)
Modify tree printing mode for template type diffing. If a diagnostic has
multiple %diff's, only print the first tree and fallback to inline printing for the rest of the diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r--lib/Basic/Diagnostic.cpp5
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,