summaryrefslogtreecommitdiffstats
path: root/clang/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
commita4056004bf30dcbc560c4739923245ff5adc388d (patch)
tree2cd16d3c3dd8d8c06dd0e550c61855ac9f92bb42 /clang/lib/Basic/Diagnostic.cpp
parent8aded18c5d09c066bf54afe6ddd27420ccb5933b (diff)
downloadbcm5719-llvm-a4056004bf30dcbc560c4739923245ff5adc388d.tar.gz
bcm5719-llvm-a4056004bf30dcbc560c4739923245ff5adc388d.zip
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. llvm-svn: 160193
Diffstat (limited to 'clang/lib/Basic/Diagnostic.cpp')
-rw-r--r--clang/lib/Basic/Diagnostic.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index 6e79b85a994..cfc07b8b4e6 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/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,
OpenPOWER on IntegriCloud