[clang] [clang-format] Remove special handling of comments after brace/paren (PR #71672)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 11 12:54:47 PST 2023
================
@@ -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))) ||
----------------
owenca wrote:
Is this inconsistent with the [documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#cpp11bracedliststyle) which says, "If there is no name, a zero-length name is assumed."
https://github.com/llvm/llvm-project/pull/71672
More information about the cfe-commits
mailing list