[clang] [clang][analyzer] Fix alignment of entries in -analyzer-help (PR #190570)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 11:27:11 PDT 2026


================
@@ -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);
----------------
steakhal wrote:

If `InitialPad` is zero, wouldn't be `FOut.PadToColumn(InitialPad)` a noop anyway? Why guard it then?

https://github.com/llvm/llvm-project/pull/190570


More information about the cfe-commits mailing list