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
This commit is contained in:
Richard Trieu 2012-07-13 21:18:32 +00:00
parent 8aded18c5d
commit a4056004bf
1 changed files with 3 additions and 2 deletions

View File

@ -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,