[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-06-12 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. You are right that this behavior is what the code authors, but also many other people, like to have and so it is what is engrained in clang-format. There are likely about a million things that fall into the same category. Now we might find that the current default is

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-06-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42787#1127790, @djasper wrote: > The normal rule for formatting options apply. If you can dig up a public > style guide and a project of reasonable size where it is used, we can add an > option. I don't want to be rude, but it seems to me

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-06-11 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. The normal rule for formatting options apply. If you can dig up a public style guide and a project of reasonable size where it is used, we can add an option. Repository: rC Clang https://reviews.llvm.org/D42787 ___

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-06-08 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Would it be acceptable to introduce an option to allow enabling this behavior? I mean would it have a chance of being integrated, or must I keep maintaining a fork of clang-format... Repository: rC Clang https://reviews.llvm.org/D42787

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc resigned from this revision. chandlerc added a comment. Since this seems not going anywhere, removing it from my review dashboard. Repository: rC Clang https://reviews.llvm.org/D42787 ___ cfe-commits mailing list

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-02 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. We have talked about that and none of us agree. Repository: rC Clang https://reviews.llvm.org/D42787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-02 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > Also double-checked with Richard Smith and he agrees that the current > behavior is preferable. For comma and plus this doesn't seem overly > important, but making it: > > aa(b + ccc * > d); > > > seems

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-02 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D42787#1025117, @Typz wrote: > If people don't care about this case, we might as well merge this :-) Just > kidding. > > The tweak matches both our expectation, the auto-indent behaviour of IDE (not > to be trusted, but still probably of

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-02 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D42787#1000687, @krasimir wrote: > We could adapt the single-argument version instead, turning: > > foo(bb + > c); > > > into: > > foo(bb + > c); > I have

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-02 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. If people don't care about this case, we might as well merge this :-) Just kidding. The tweak matches both our expectation, the auto-indent behaviour of IDE (not to be trusted, but still probably of 'default' behaviour for many people, esp. when you don't yet use a

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Are you sure that you are even addressing an important case? I have done some research on our codebase and this is something that happens incredibly rarely. The reason is that you have to have a very specific combination of line length, where the last parameter does

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42787#1022081, @djasper wrote: > But you *do* want extra indentation in the case of: > > function(a, >b + >cc); > > > I understand you argument, but I don't agree at the moment. As is (without > getting

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. But you *do* want extra indentation in the case of: function(a, b + cc); I understand you argument, but I don't agree at the moment. As is (without getting more feedback from others that clang-format is behaving unexpected here), I

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42787#994781, @djasper wrote: > What I mean is, users will find it surprising if whether or not a parameter > gets wrapped leads to a different indentation internal to that parameter. I > have not heard of a single user that would be surprised

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-09 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42787#1000687, @krasimir wrote: > We could adapt the single-argument version instead, turning: > > foo(bb + > c); > > > into: > > foo(bb + > c); > We could

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. We could adapt the single-argument version instead, turning: foo(bb + c); into: foo(bb + c); Repository: rC Clang https://reviews.llvm.org/D42787

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Ah, Manuel and Krasimir are already on this thread, maybe they can comment? I also added Chandler and Sam who I know care about formatting somewhat. Repository: rC Clang https://reviews.llvm.org/D42787 ___ cfe-commits

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I don't mean trivial with a diff. What I mean is, users will find it surprising if whether or not a parameter gets wrapped leads to a different indentation internal to that parameter. I have not heard of a single user that would be surprised by this extra indentation.

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-01 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > You might doubt it, but having written the code I can tell you that it's the > case. Ok, you win :-) > I see the argument why this indentation is not necessary in exactly the case > where the last parameter is multi-line and not wrapped to a new line itself: > You

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. You might doubt it, but having written the code I can tell you that it's the case. Shame on me for not writing a test, though. I see the argument why this indentation is not necessary in exactly the case where the last parameter is multi-line and not wrapped to a new

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-01 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I doubt this particular was intentional, esp. since this case never happens in the tests. I think it is more a side-effect of the (general) indent in "fake" parenthesis. Here is an exemple: Before this change: foo(a, bb +

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I am against this change. The current behavior here is intentional and IMO more consistent. If there is more than one precedence level in a set of parentheses, we add the additional indentation. If you don't like it, surround it with extra parentheses. Generally, it'd

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-01 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Typz added reviewers: krasimir, djasper, klimek. There should be no extra indent when wrapping only the expression used as last argument. This is consistent with the behavior when the first (and only) argument's expression is wrapped. foo(a, bb +