[clang] [clang-format] Remove special handling of comments after brace/paren (PR #71672)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 13 11:58:30 PDT 2026


================
@@ -925,7 +925,12 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
                         TT_TableGenDAGArgOpenerToBreak) &&
       !(Current.MacroParent && Previous.MacroParent) &&
       (Current.isNot(TT_LineComment) ||
-       Previous.isOneOf(BK_BracedInit, TT_VerilogMultiLineListLParen)) &&
+       (Previous.is(BK_BracedInit) &&
+        (Style.Cpp11BracedListStyle != FormatStyle::BLS_FunctionCall ||
+         !Previous.Previous ||
+         Previous.Previous->isNoneOf(tok::identifier, tok::l_paren,
----------------
HazardyKnusperkeks wrote:

Then let's remove them: https://github.com/llvm/llvm-project/pull/191872
Most likely they handled some of the cases before I introduced the enum, but not everything and I forgot to revert that.

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


More information about the cfe-commits mailing list