[PATCH] D48034: [clang-format] Discourage breaks in submessage entries

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 11 10:04:29 PDT 2018


sammccall added a comment.

All else equal, I'd expect this to be a hard rule, at least in google-style.

"foo\n  { a: b }" --> "foo {\n  a: b\n}" only makes the first line longer, by 2 chars. So if 78 < indent + len("foo") <= 80 we're breaking the line limit, but that seems vanishingly rare.

If the penalty is sufficient to stop it happening almost always, maybe it works out the same.


Repository:
  rC Clang

https://reviews.llvm.org/D48034





More information about the cfe-commits mailing list