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

via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 11 17:10:03 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,
----------------
sstwcw wrote:

> What's the point you want to make?

I want to understand why different kinds of braced lists should be treated differently.  I am not suggesting that there is a problem with the code.

> Is there something wrong, or that bothers you?

Mostly what bothers me is that I don't understand the code.  By the way, removing this line does not break any test.


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


More information about the cfe-commits mailing list