[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 03:43:46 PDT 2020
curdeius added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1362-1367
+ if (Style.AlignOperands != FormatStyle::OAS_DontAlign && Previous &&
+ (Previous->getPrecedence() == prec::Assignment ||
+ Previous->is(tok::kw_return) ||
+ (*I == prec::Conditional && Previous->is(tok::question) &&
+ Previous->is(TT_ConditionalExpr))) &&
+ !Newline)
----------------
You could factor out the part of the condition that doesn't concern `AlignOperands` to get rid of the repetition wrt. the previous `if`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85600/new/
https://reviews.llvm.org/D85600
More information about the cfe-commits
mailing list