[PATCH] D43290: clang-format: tweak formatting of variable initialization blocks

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 05:16:45 PST 2018


Typz added a comment.

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)

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...


Repository:
  rC Clang

https://reviews.llvm.org/D43290





More information about the cfe-commits mailing list