diff options
author | Richard Trieu <rtrieu@google.com> | 2012-07-13 21:18:32 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2012-07-13 21:18:32 +0000 |
commit | a4056004bf30dcbc560c4739923245ff5adc388d (patch) | |
tree | 2cd16d3c3dd8d8c06dd0e550c61855ac9f92bb42 /clang/lib/Basic/Diagnostic.cpp | |
parent | 8aded18c5d09c066bf54afe6ddd27420ccb5933b (diff) | |
download | bcm5719-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.cpp | 5 |
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, |