================
@@ -37,9 +37,14 @@ void AnalyzerOptions::printFormattedEntry(
 
   const size_t PadForDesc = InitialPad + EntryWidth;
 
-  FOut.PadToColumn(InitialPad) << EntryDescPair.first;
-  // If the buffer's length is greater than PadForDesc, print a newline.
-  if (FOut.getColumn() > PadForDesc)
+  if (InitialPad != 0)
+    FOut.PadToColumn(InitialPad);
----------------
filaka771 wrote:

Actually, PadToColumn inserts, at least, 1 space, as you can see here: 
https://github.com/llvm/llvm-project/blob/dea9b6e1493e663fd7f07f486d96a14d7fbf1cad/llvm/lib/Support/FormattedStream.cpp#L130

This led to the second bug I explained in the description of this PR and 
motivated me to add this guard.

https://github.com/llvm/llvm-project/pull/190570
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to