[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
Thu Feb 1 05:07:31 PST 2018
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, bbbbbbbbbbbbbbbbbb +
ccccccccccccccccc);
foo(bbbbbbbbbbbbbbbbb +
ccccccccccccccccc);
foo(a,
bbbbbbbbbbbbbbbbb +
ccccccccccccccccc,
d);
foo(bbbbbbbbbbbbbbbbb +
ccccccccccccccccc,
d);
After this change:
foo(a, bbbbbbbbbbbbbbbbbb +
ccccccccccccccccc);
foo(bbbbbbbbbbbbbbbbb +
ccccccccccccccccc);
foo(a,
bbbbbbbbbbbbbbbbb +
ccccccccccccccccc,
d);
foo(bbbbbbbbbbbbbbbbb +
ccccccccccccccccc,
d);
i.e. this patch only affect the 'first' scenario (e.g. wrapping expression in last argument) consistent with the second one (e.g. wrapping expression in first and only argument)
Repository:
rC Clang
https://reviews.llvm.org/D42787
More information about the cfe-commits
mailing list