[cfe-commits] r160193 - /cfe/trunk/lib/Basic/Diagnostic.cpp

Richard Trieu rtrieu at google.com
Fri Jul 13 14:18:32 PDT 2012


Author: rtrieu
Date: Fri Jul 13 16:18:32 2012
New Revision: 160193

URL: http://llvm.org/viewvc/llvm-project?rev=160193&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Basic/Diagnostic.cpp

Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=160193&r1=160192&r2=160193&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Fri Jul 13 16:18:32 2012
@@ -844,8 +844,9 @@
       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,





More information about the cfe-commits mailing list