[PATCH] D43290: clang-format: tweak formatting of variable initialization blocks
Daniel Jasper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 20 23:10:22 PST 2018
djasper added a comment.
In https://reviews.llvm.org/D43290#1008647, @Typz wrote:
> Tweaking the penalty handling would still be needed in any case, since the problem happens also when Cpp11BracedListStyle is true (though the effect is more subtle)
I don't understand this. Which style do you actually care about? With Cpp11BracedListStyle=true or =false?
> Generally, I think it is better to just rely on penalties, since it gives a way to compare and weight each solution. Then each style can decide what should break first: e.g. a style may also have a lower `PenaltyBreakAssignment`, thus wrapping after the equal sign would be expected...
And with my reasoning, I think exactly the opposite. Penalties are nice, but if the behavior is generally unwanted, than it's very hard to predict in which situations it might still occur.
Repository:
rC Clang
https://reviews.llvm.org/D43290
More information about the cfe-commits
mailing list