[clang] clang-format: ensure ternary operands are aligned (PR #196697)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Sun May 10 06:12:09 PDT 2026
================
@@ -1276,6 +1276,21 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
CurrentState.BreakBeforeParameter = false;
CurrentState.AlignedTo = &Current;
}
+ if (!CurrentState.AlignedTo && Current.is(TT_ConditionalExpr)) {
----------------
HazardyKnusperkeks wrote:
The assignment of `AlignedTo` is always unconditional in this function, I think we should keep it that way for consistency.
https://github.com/llvm/llvm-project/pull/196697
More information about the cfe-commits
mailing list