[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-06-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:2520 + /// readability to have the signature indented two levels and to use + /// ``OuterScope``. The KJ style guide requires ``OuterScope`. + /// `KJ style guide Here is

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-06-22 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64cf5eba06bd: [clang-format] Add new LambdaBodyIndentation option (authored by vlovich, committed by HazardyKnusperkeks). Changed prior to commit: https://reviews.llvm.org/D102706?vs=347152&id=353753#to

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-06-18 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. I think you can go ahead & commit it for me. I don't know when I'll get commit access. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102706/new/ https://reviews.llvm.org/D102706 ___ cfe-commits mailing list cfe-commi

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-06-17 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D102706#2823087 , @vlovich wrote: > I don't think I have permissions. Happy to do it if I'm given permissions > (I'm assuming the instructions are the general LLVM ones). Otherwise: > > Name: Vitali Lovich > E-mail:

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-06-16 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. I don't know how to commit. Happy to do it if I have the permissions & appropriate instructions. Name: Vitali Lovich E-mail: vlov...@gmail.com CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102706/new/ https://reviews.llvm.org/D102706 _

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-06-10 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D102706#2787550 , @HazardyKnusperkeks wrote: > LGTM, but please wait for more responses. No one objected, so I declare it ready to commit. Do you need some one to do it? If yes please post name and email for the c

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. LGTM, but please wait for more responses. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102706/new/ https://reviews.llvm.org/D102706 _

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-27 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich marked an inline comment as done. vlovich added a comment. I think all review comments have been addressed. Please let me know if there's anything else blocking merge. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102706/new/ https://reviews.llvm.org/D102706 __

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I personally like to keep clang-format and clang-format tests clang formatted all the time so we have a reasonable set of "clang-format-clean" code we can sanity check any change against, the more of LLVM that can be clean the better our testing can be. ==

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-21 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 347152. vlovich added a comment. Regen documentation & clang-format test cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102706/new/ https://reviews.llvm.org/D102706 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rst

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-21 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. In D102706#2774010 , @MyDeveloperDay wrote: > Is ```Signature``` effectively as is? Yes. I noted that it's the default behavior. Please let me know if I can clarify the documentation wording somehow (or if you have preferred wo

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-21 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. In D102706#2774018 , @MyDeveloperDay wrote: > Could you clang-format the tests please so I can more easily read them. Sure. I was just taking my queue from the rest of the file which appeared to intentionally not clang-format t

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Could you clang-format the tests please so I can more easily read them. Comment at: clang/docs/ClangFormatStyleOptions.rst:2790 +**LambdaBodyIndentation** (``LambdaBodyIndentationKind``) + What is the lambda body indented relative to (default

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Is ```Signature``` effectively as is? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102706/new/ https://reviews.llvm.org/D102706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-20 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 346869. vlovich added a comment. Herald added a subscriber: mgrang. Review response - Add examples to documentation + links to KJ style guide. - Add better header doc - Add more test cases - Add release notes - Note current "problem" test with a TODO (corner

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-20 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. > verifyFormat("test() {\n" > > " ([]() -> {\n" > "int b = 32;\n" > "return 3;\n" > " }).foo();\n" > "}", > Style); > > There you have parenthesis around the lambda, how about without? > Maybe just something like > > std::sort(v.begin(), v.end(),

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D102706#2766871 , @vlovich wrote: > In D102706#2766680 , > @HazardyKnusperkeks wrote: > >> Maybe a bit more test cases with smaller lambdas? Or without the outer >> parenth

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-18 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. In D102706#2766680 , @HazardyKnusperkeks wrote: > Maybe a bit more test cases with smaller lambdas? Or without the outer > parenthesis? I'm not sure I understand this comment. Which test case are you referring to by "or withou

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Maybe a bit more test cases with smaller lambdas? Or without the outer parenthesis? Comment at: clang/include/clang/Format/Format.h:2456 + enum LambdaBodyIndentationKind : unsigned char { +/// Align lambda body relative to the lambda si

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-18 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. I'm not 100% certain if the implementation is absolutely correct. For example, the `#define A` test case is broken (the closing brace is on the wrong line). Additionally, the `pop_back` feels weird but seems to fix all the other cases to make the closing brace aligned p

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-18 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich created this revision. vlovich added reviewers: MyDeveloperDay, curdeius. vlovich added a project: clang-format. vlovich requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently the lambda body indents relative to where the lambda