[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter
Francois Ferrand via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 2 07:02:17 PST 2018
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:
>
> aaaaaaaaaa(bbbbbbbbb + ccccccccccc *
> ddddddddd);
>
>
> seems really bad to him as this suggests that we are adding both ccccccccccc and ddddddddd.
>
> aaaaaaaaaa(bbbbbbbbb + ccccccccccc *
> ddddddddd);
>
>
> seems clearer.
And I fully agree with this!
But I don't think that would be affected by my patch... I hope it does not at least, and I'll try to double check (and add a test).
> And for consistency reasons, we should not treat those two cases differently.
The consistency is related only to the implementation of clang-format: for a language (and its users) they are not the same things, comma separating arguments are not operators and are used to separate different expressions.
Repository:
rC Clang
https://reviews.llvm.org/D42787
More information about the cfe-commits
mailing list