[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-11-18 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. I am not 100% that it is thanks to this patch but reformatting Firefox code with clang-format 11 significantly improves the readability of the usage of ternary operators. See: https://phabricator.services.mozilla.com/D90795 Thanks for the change! Repository:

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb18c63e85aa8: [clang-format] use spaces for alignment of binary/ternary expressions with… (authored by fickert, committed by curdeius). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1360 + if (Style.AlignOperands == FormatStyle::OAS_AlignAfterOperator) +NewParenState.UnindentOperator = true; + // Mark indentation as alignment if the expression is aligned.

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1360 + if (Style.AlignOperands == FormatStyle::OAS_AlignAfterOperator) +NewParenState.UnindentOperator = true; + // Mark indentation as alignment if the expression is aligned.

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert added a comment. Yes I think it's unrelated, though this patch should fix the alignment in that example when using the `UT_AlignWithSpaces` option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85600/new/ https://reviews.llvm.org/D85600

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In D85600#2209545 , @Typz wrote: > Could this also be causing https://bugs.llvm.org/show_bug.cgi?id=33896 ? > > I'll try to see if changes something in that case... Actually, I can confirm this is unrelated.

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Could this also be causing https://bugs.llvm.org/show_bug.cgi?id=33896 ? I'll try to see if changes something in that case... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85600/new/ https://reviews.llvm.org/D85600

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert added a comment. Thanks! I don't have push permissions to the repository so I cannot submit the commit myself (Maximilian Fickert ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85600/new/ https://reviews.llvm.org/D85600

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Thank you for the patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85600/new/ https://reviews.llvm.org/D85600

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert updated this revision to Diff 284643. fickert added a comment. Resolved repetitive conditions in the two consecutive `if`s and added a small comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85600/new/ https://reviews.llvm.org/D85600

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-11 Thread Marek Kurdej via Phabricator via cfe-commits
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) || +

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-09 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert added a comment. This fixes an oversight in the new `UT_AlignWithSpaces` option (see D75034 ), which did not correctly identify the alignment of binary/ternary expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-09 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert created this revision. fickert added reviewers: clang-format, MyDeveloperDay. fickert added projects: clang-format, clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. fickert requested review of this revision. Use spaces to align binary and ternary