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

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

[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

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

2018-07-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Herald added a subscriber: acoomans. Comment at: lib/Format/TokenAnnotator.cpp:627 } +if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { +++Left->BlockParameterCount; Why do we want to

[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-27 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D44609#1143895, @Wawha wrote: > 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? > >

[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

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

2018-06-03 Thread mephi42 via Phabricator via cfe-commits
mephi42 added a comment. This change is very useful for me (I even rebuilt my clang-format with it), but there were no updates for quite some time - do you still intend to integrate it? Apologies in advance if Phabricator is not the right place for such discussions. Repository: rC Clang

[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

[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

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

2018-04-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Format/Format.h:891 + /// \endcode + bool BreakBeforeLambdaBody; + I'd just make that default for Allman style. Comment at: lib/Format/TokenAnnotator.cpp:2844 if (isAllmanBrace(Left)

[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

[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

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

2018-04-06 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Please read: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options In this case in particular, I would be very interested in a style guide that defines how Allman brace style and lambdas work together. IMO, it has so many corner

[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

[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

[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

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

2018-03-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Also, tests? Repository: rC Clang https://reviews.llvm.org/D44609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-03-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please always upload all patches with full context (`-U99`) 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-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