[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
Wed Sep 24 14:14:37 PDT 2025


================
@@ -802,7 +802,10 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
       Previous.isNot(TT_ObjCMethodExpr) && Previous.isNot(TT_RequiresClause) &&
       !(Current.MacroParent && Previous.MacroParent) &&
       (Current.isNot(TT_LineComment) ||
-       Previous.isOneOf(BK_BracedInit, TT_VerilogMultiLineListLParen))) {
+       (Previous.is(BK_BracedInit) &&
+        (!Style.Cpp11BracedListStyle || !Previous.Previous ||
+         Previous.Previous->isNot(tok::identifier))) ||
----------------
HazardyKnusperkeks wrote:

Better?

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


More information about the cfe-commits mailing list