[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

2021-06-15 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Indeed, I found another case with a regression: return iter::chain.from_iterable( [](auto&& ite) -> auto& { return ite.second; }); it's format all inline. And also another different in that case (without lambda): ASSERT_NO_THROW(

[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

2021-06-15 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. In D104222#2819422 , @MyDeveloperDay wrote: > Add some of the failing cases identified by @Wawha Thank for the fix. I test and discover a new case with a regression: auto createObj = [this] -> std::unique_ptr

[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

2021-06-15 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. In D104222#2819358 , @MyDeveloperDay wrote: > @Wawha your cases could be covered by the following (in mustBreakBefore) > > if (Style.BraceWrapping.BeforeLambdaBody && Right.is(TT_LambdaLBrace) && > Left.isOneOf(tok::star, t

[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

2021-06-15 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Hi @christophe-calmejane. I test your code with a old version (few time after the merge of https://reviews.llvm.org/D44609), and the latest version (commit: e0c382a9d5a0 ), and in both cases I have the s

[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

2021-06-15 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. In D104222#2817147 , @MyDeveloperDay wrote: > @Wawha do you have a project that perhaps uses this work your did? I would > like to ensure I didn't break anything @MyDeveloperDay Good idea! I just test on my code, and I see 2 type

[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

2021-06-14 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3760 - (isAllmanBraceIncludedBreakableLambda(Left, ShortLambdaOption) || - isAllmanBraceIncludedBreakableLambda(Right, ShortLambdaOption))) { -return true; Without this co

[PATCH] D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set

2021-03-21 Thread Francois JEAN via Phabricator via cfe-commits
Wawha accepted this revision. Wawha added a comment. This revision is now accepted and ready to land. Thank you for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99031/new/ https://reviews.llvm.org/D99031 _

[PATCH] D79320: [clang-format [PR45791] BeforeLambdaBody is confused by comment inside lambda

2020-05-04 Thread Francois JEAN via Phabricator via cfe-commits
Wawha accepted this revision. Wawha added a comment. This revision is now accepted and ready to land. Thanks for the patch ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79320/new/ https://reviews.llvm.org/D79320 ___

[PATCH] D79022: [clang-format] Fix a bug causing BeforeLambdaBody to affect brace initialiser formatting

2020-04-28 Thread Francois JEAN via Phabricator via cfe-commits
Wawha accepted this revision. Wawha added a comment. Thanks for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79022/new/ https://reviews.llvm.org/D79022 ___ cfe-commits mailing list cfe-commit

[PATCH] D78909: [clang-format] NFC clang-format the clang-format sources

2020-04-27 Thread Francois JEAN via Phabricator via cfe-commits
Wawha accepted this revision. Wawha added a comment. Thank for the changes ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78909/new/ https://reviews.llvm.org/D78909 ___ cfe-commits mailing list cfe-co

[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 formatti

[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 : https://github.com/llvm/llvm-project/commit/fa0118e

[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: https://reviews.llvm.org/D44609?vs=241875&

[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 w

[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 if

[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 clang/docs/ReleaseNotes.rs

[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 t

[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 AllowShor

[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))); State.Stack.back().IsInsideObjCA

[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))); State.Stack.back().IsInsideObjCA

[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 cfe-commits@lists.llv

[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 (in

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-07-03 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:627 } +if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { +++Left->BlockParameterCount; klimek wrote: > Why do we want to increase the parameter count

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-07-02 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 153813. Wawha added a comment. Here the third version to manage break with lambda in Allman. I implement the modification propose by klimek. If a lambda is detected, the BlockParameterCount and ParameterCount are increment one more time in order to avoid extra

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-06-26 Thread Francois JEAN via Phabricator via cfe-commits
Wawha marked 2 inline comments as done. Wawha added a comment. Hello, after my last modification (require by previous comment), I do not see any feedback or validation for this patch. Is their something special to do in order to go forward on this patch? Lambda are more an more used in modern

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-28 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 144460. Wawha added a reviewer: klimek. Wawha added a comment. Hi klimek, I upload a new patch with the modifications you proposed. The option is now enable by default in Allman style. So I move the option to the BraceWrappingFlags struct, which make more sense

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-27 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Hi klimek, many thank for your comments. I will made the modifications you propose and then update this patch. Repository: rC Clang https://reviews.llvm.org/D44609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-23 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Hi djasper, Here a project where there is lambda and allman style for them : https://github.com/boostorg/hof/blob/develop/example/in.cpp https://github.com/boostorg/hof/blob/develop/example/sequence.cpp Example of code: // Function to find an iterator using a contain

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-06 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. I'm not working on a public project with a public style guide, so not sure it will fit all the requirement inside. But perhaps the request of Rian for bareflank (https://bugs.llvm.org//show_bug.cgi?id=32151#c4) could help to fit the needs. The current patch do not exactl

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-03-28 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. I do not know which reviewer to add for this review. Is it possible to give the name of the person that will be able to review this code ? Repository: rC Clang https://reviews.llvm.org/D44609 ___ cfe-commits mailing list c

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-03-18 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. In https://reviews.llvm.org/D44609#1041260, @lebedev.ri wrote: > Also, tests? Sorry, the test files was missing with the first patch. I make mistake using svn... I create the new patch with git, it's easier for me. There is 4 small tests inside unittests/Format/FormatTes

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-03-18 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 138859. Wawha added a comment. I upload the full context for these files. Repository: rC Clang https://reviews.llvm.org/D44609 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/TokenAnnotator.

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-03-18 Thread Francois JEAN via Phabricator via cfe-commits
Wawha created this revision. Herald added subscribers: cfe-commits, klimek. This is a patch to fix the problem identify by this bug: https://bugs.llvm.org/show_bug.cgi?id=27640. When formatting this code with option "BreakBeforeBraces: Allman", the lambda body are not put entirely on new lines