[PATCH] D68296: clang-format: Add ability to wrap braces after multi-line control statements

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 2 08:10:10 PDT 2019


klimek added a comment.

In D68296#1691393 <https://reviews.llvm.org/D68296#1691393>, @mitchell-stellar wrote:

> Thanks for the review. I have added documentation updates.
>
> I do not have a public style guide to reference. My company just switched to auto-clang-formatting all of our code, and this patch addresses one of our biggest pain points: readability. When the opening brace of a multi-line control statement is not wrapped, we simply cannot tell at first glance where the control statement ends and where the body begins due to our indentation settings.
>
> I think the fact that you yourself see the benefit of this change speaks to its viability.
>
> I cannot think of any other brace wrapping rules that need this level of control. Our code base consists of millions of lines of code, so I'm pretty sure we would have found another instance.
>
> I would be willing to support this patch and further revisions if this gets into master, as our company will depend on this feature.


I personally don't think the feature is worth it (readability is something we really like to assert on without good measurements), but I will defer to MyDeveloperDay.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68296/new/

https://reviews.llvm.org/D68296





More information about the cfe-commits mailing list