[PATCH] D50078: clang-format: support aligned nested conditionals formatting
Francois Ferrand via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 00:29:31 PDT 2019
Typz marked 3 inline comments as done.
Typz added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1125
+ if (Current.is(TT_ConditionalExpr) && Current.is(tok::question) &&
+ ((Current.MustBreakBefore) ||
+ (Current.getNextNonComment() && Current.getNextNonComment()->MustBreakBefore)))
----------------
Maybe it would be better to go through here whenever this is wrapped (e.g. `Newline == true`) : but this implies akso introducing a penalty for "breaking" the nested conditional alignment. May ultimately be better, though probably somewhat more complex still.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D50078/new/
https://reviews.llvm.org/D50078
More information about the cfe-commits
mailing list