[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-28 Thread Martin Probst via Phabricator via cfe-commits
mprobst marked 2 inline comments as done. mprobst added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3165 + } +} + RKSimon wrote: > @mprobst - this is breaking buildbots: > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-and

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-27 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3165 + } +} + @mprobst - this is breaking buildbots: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/27196/steps/bootstrap%20clang/logs/stdio Please

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-27 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG02656f29abda: clang-format: [JS] options for arrow functions. (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D73335?vs=240202&id=240575#toc Repository: rG LLVM Github Monore

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Format/FormatTestJS.cpp:1793 verifyFormat("export default [];"); - verifyFormat("export default () => {};"); verifyFormat("export i

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-24 Thread Martin Probst via Phabricator via cfe-commits
mprobst added a comment. > If that's the case, consider adding the option to the style in a follow-up > patch: > > GoogleStyle.AllowShortLambdasOnASingleLine = FormatStyle::SLS_All; > > > that would have an advantage of making clear which test case diffs are result > of the implementatio

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-24 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 240202. mprobst added a comment. - Disable arrow functions on single lines by default. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73335/new/ https://reviews.llvm.org/D73335 Files: clang/lib/Format/Format.

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. > FYI I've started a conversation on whether SLS_All should be the default > Google style. But the option I think is useful in either case. If that's the case, consider adding the option to the style in a follow-up patch: GoogleStyle.AllowShortLambdasOnASingleLine =

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-24 Thread Martin Probst via Phabricator via cfe-commits
mprobst added a comment. FYI I've started a conversation on whether `SLS_All` should be the default Google style. But the option I think is useful in either case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73335/new/ https://reviews.llvm.org/D7

[PATCH] D73335: clang-format: [JS] options for arrow functions.

2020-01-24 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. mprobst added a reviewer: krasimir. Herald added a project: clang. clang-format currently always wraps the body of non-empty arrow functions: const x = () => { z(); }; This change implements support for the `AllowShortLambdasOnASingleLine` style options, an