[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2021-06-22 Thread Mike Weller via Phabricator via cfe-commits
Userbla added a comment. I applied this fix locally to a branch based off llvm 11.x and the `FormatTest.FormatsTypedefEnum` test now fails. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44609/new/ https://reviews.llvm.org/D44609

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2021-06-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3312 + auto ShortLambdaOption = Style.AllowShortLambdasOnASingleLine; + if (Style.BraceWrapping.BeforeLambdaBody && + (isAllmanBraceIncludedBreakableLambda(Left, ShortLambdaOption) ||

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2021-06-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3741 tok::colon, tok::l_square, tok::at) || + (Style.BraceWrapping.BeforeLambdaBody && Right.is(tok::l_brace)) || (Left.is(tok::r_paren) &&

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2021-06-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. namespace test { class Test { public: Test() = default; }; } // namespace test Getting miss formatted when BeforeLambdaBody is true Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44609/new/

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2021-06-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Herald added a subscriber: sstefan1. Tracking a possible bug, https://bugs.llvm.org/show_bug.cgi?id=50702 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44609/new/ https://reviews.llvm.org/D44609

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-26 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. In D44609#1893390 , @christophe-calmejane wrote: > Nice to finally see this patch integrated! > > But, it looks like you didn't include all the test case I posted 1.5y ago in > this post, that are still problematic and not

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-26 Thread Christophe Calmejane via Phabricator via cfe-commits
christophe-calmejane added a comment. In D44609#1875172 , @Wawha wrote: > In D44609#1871612 , @MyDeveloperDay > wrote: > > > Correct follow that description on how to request commit access > > > It's done. I have

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-13 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. In D44609#1871612 , @MyDeveloperDay wrote: > Correct follow that description on how to request commit access It's done. I have the commit right, and push that change on github :

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-13 Thread Francois JEAN via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfa0118e6e588: [clang-format] Add new option BeforeLambdaBody in Allman style. (authored by Wawha). Herald added a reviewer: jdoerfert. Changed prior to commit:

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Correct follow that description on how to request commit access Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44609/new/ https://reviews.llvm.org/D44609 ___ cfe-commits

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-11 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Thank you @MyDeveloperDay for the validation! I'm happy that my contribution (and my work to do it well) is accepted. And yes, I will be there to help to maintain that code and fix bugs if necessary. About the permission in order to land that patch, I'm not sure that I

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. This patch is nearly 2 years old, and there has been a lot of discussion and I can see you've put a lot of work into adding the tests which prove it works, from my perspective

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-10 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Hi @MyDeveloperDay Is the last change ok? That is the next step to be able to validate this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44609/new/ https://reviews.llvm.org/D44609

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-01 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 241874. Wawha marked an inline comment as done. Wawha added a comment. @MyDeveloperDay I launch docs/tools/dump_style.py on ClangFormatStyleOptions.rst (it seems to generate the same result as the previous diff) and add an entry in the Release Note. Tell me

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-02-01 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 241875. Wawha marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44609/new/ https://reviews.llvm.org/D44609 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-01-28 Thread Michael via Phabricator via cfe-commits
Alundra added a comment. @Wawha In the same style of this missing feature, I think you are also aware of the miss of clang-format about struct/array initializer like: https://bugs.llvm.org/show_bug.cgi?id=40411 Basically to have the break for braces after the '=' of the struct/array

[PATCH] D44609: [clang-format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-01-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think if you can fix the missing documentation it looks pretty good to go. I do like the use of the static functions and the extensive test cases.. thank you. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1442 +// Search for any

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-01-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Please can you regenerate the ClangFormatStyleOptions.rst using docs/tools/dump_style.py and add an entry into the clang release notes in the clang-format section Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-01-20 Thread Francois JEAN via Phabricator via cfe-commits
Wawha marked 2 inline comments as done. Wawha added a comment. Hello, @klimek will you have time to review this patch? The current patch integrate the last remarks and also modification due to inline lambda. Comment at: lib/Format/ContinuationIndenter.cpp:1179 +

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2020-01-12 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 237563. Wawha added a comment. Here a new version of the patch with the last version of the source. It fixes problem with inline lambda. I add more more UnitTest to test. I also make few small changes to follow remarks. Do not hesitate to make remarks, I hope

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2019-12-29 Thread Taw via Phabricator via cfe-commits
tawmoto added a comment. In D44609#1798209 , @Alundra wrote: > Please review and consider a merge of this change which looks to not have > news since long time. > It's useful for a lot of people and it's awesome that there is a ready or > almost ready

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2019-12-29 Thread Michael via Phabricator via cfe-commits
Alundra added a comment. Please review and consider a merge of this change which looks to not have news since long time. It's useful for a lot of people and it's awesome that there is a ready or almost ready patchset about it. Thanks a lot! CHANGES SINCE LAST ACTION

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2019-09-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thanks for the patch, so sorry its taking a long time, its patches like this why I'm about to make a phabricator project for #clang-format alone so that we can ensure all clang-format patches can be see in isolation. I think we need to get this patches rebased

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2019-09-24 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a reviewer: krasimir. zturner added a comment. What's the status of this patch, out of curiosity? It doesn't seem there were any objections to the original idea, just that nobody with ownership over clang-format is still actively participating in the review. +krasimir to maybe

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2019-08-23 Thread Christian Venegas via Phabricator via cfe-commits
cvenegas added a comment. I'm testing this patch on our codebase and it is working pretty well. We use the Allman style and the lambda problem has been an issue for many years. One thing to note in this patch is that some of the files have CRLF line endings but should be LF endings, which is

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2019-08-20 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 216061. Wawha added a comment. Herald added a subscriber: ormris. I update the patch for the last version of clang format, especially since option "AllowShortLambdasOnASingleLine" has been added (which require more change for this patch). Indeed, for

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-10-04 Thread Christophe Calmejane via Phabricator via cfe-commits
christophe-calmejane added a comment. I fixed it like this (not sure it's 100% correct though!!) State.Stack.back().HasMultipleNestedBlocks = Current.BlockParameterCount > 1; if (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr && Current.Tok.getKind() ==

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-10-04 Thread Christophe Calmejane via Phabricator via cfe-commits
christophe-calmejane added a comment. Ok I found the issue with noexcept, it's not related to your patch. There is a missing case tok::kw_noexcept: in UnwrappedLineParser::tryToParseLambda Repository: rC Clang https://reviews.llvm.org/D44609

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-10-04 Thread Christophe Calmejane via Phabricator via cfe-commits
christophe-calmejane added a comment. Actually, without your change to HasMultipleNestedBlocks, I'm almost getting the expected result: Lambda body is correctly indented (and not by function name's length). The only thing not working (and it's not either way, with or without your change to

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-10-04 Thread Christophe Calmejane via Phabricator via cfe-commits
christophe-calmejane added a comment. Hi, consider the following code myFunc([](int x) { if (x) call(); }); When activating your BeforeLambdaBody option, it changes the code to this (breaking the start of the lambda to a new line) myFunc( [](int x)

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-09-28 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. In https://reviews.llvm.org/D44609#1059675, @Wawha wrote: > In my case, the main requirement is to be able **avoid** a lambda in one line. That doesn't work for me. I would like short lambdas still be formatted in one line, when `AllowShortFunctionsOnASingleLine` or

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-09-04 Thread Francois JEAN via Phabricator via cfe-commits
Wawha marked an inline comment as done. Wawha added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1307 + (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr && +Current.Next->is(TT_LambdaLSquare)));

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-09-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1307 + (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr && +Current.Next->is(TT_LambdaLSquare))); State.Stack.back().IsInsideObjCArrayLiteral = Wawha

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-09-01 Thread Francois JEAN via Phabricator via cfe-commits
Wawha marked 2 inline comments as done. Wawha added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1307 + (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr && +Current.Next->is(TT_LambdaLSquare)));

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-08-27 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1307 + (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr && +Current.Next->is(TT_LambdaLSquare))); State.Stack.back().IsInsideObjCArrayLiteral = klimek

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-08-25 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Hi klimek, do you have time to take a look again to this patch? Is my last patch ok for you? best regards, François Repository: rC Clang https://reviews.llvm.org/D44609 ___ cfe-commits mailing list

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-07-13 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1307 + (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr && +Current.Next->is(TT_LambdaLSquare))); State.Stack.back().IsInsideObjCArrayLiteral = I think

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-07-12 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 155254. Wawha retitled this revision from "[Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call" to "[Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call