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
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
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
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
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?
>
>
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
19 matches
Mail list logo