[PATCH] D11542: Refactoring how macro backtraces are printed

Richard Trieu rtrieu at google.com
Mon Jul 27 15:21:59 PDT 2015


rtrieu added inline comments.

================
Comment at: lib/Frontend/DiagnosticRenderer.cpp:403
@@ +402,3 @@
+  // Find the spelling location for the macro definition. We must use the
+  // spelling location here to avoid emitting a macro bactrace for the note.
+  SourceLocation SpellingLoc = Loc;
----------------
"bactrace" => "backtrace"

================
Comment at: lib/Frontend/DiagnosticRenderer.cpp:446
@@ -417,2 +445,3 @@
 
   // Walk up to the caller of this macro, and produce a backtrace down to there.
+  SmallVector<SourceLocation, 8> LocationStack;
----------------
This comment was for the recursive version of this code.  Change to say that the intermediate macro locations are being stored for processing.

================
Comment at: lib/Frontend/DiagnosticRenderer.cpp:457
@@ +456,3 @@
+  if (MacroDepth <= MacroLimit || MacroLimit == 0) {
+    for (auto I = LocationStack.rbegin(), E = LocationStack.rend(); 
+         I != E; ++I)
----------------
There's an extra space at the end of this line, and several below.  Remove them.


http://reviews.llvm.org/D11542







More information about the cfe-commits mailing list