================
@@ -996,7 +996,13 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState
&State, bool DryRun,
Next->is(TT_FunctionDeclarationLParen) ||
IsFunctionCallParen(*Next);
};
if (IsOpeningBracket(Previous) &&
- State.Column > getNewLineColumn(State).Total &&
+ (State.Column > getNewLineColumn(State).Total ||
+ // IsOpeningBracket checks BreakAfterOpenBracketBracedList before its
+ // (!Tok.Previous) shortcut. All other true returns with a preceding
+ // token require a BreakAfterOpenBracket* option.
+ // Only forbid later breaks if a break here is possible to prevent
+ // alternatives from being blocked.
+ ((Previous.Previous || Previous.is(tok::l_brace)) && canBreak(State)))
&&
----------------
ChrisLee02 wrote:
Updated:
https://github.com/llvm/llvm-project/pull/228085/commits/f3e28468fbb4ee296f3ea31a16726a6908c76f2b
I extracted `ShouldBreakAfterOpeningBracket` and intentionally repeated token
checks from IsOpeningBracket to make the supported cases explicit, rather than
relying on the presence of a preceding token.
https://github.com/llvm/llvm-project/pull/228085
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits