[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 14 03:28:25 PST 2022


owenpan added inline comments.


================
Comment at: clang/docs/ClangFormatStyleOptions.rst:3398
 
+**RemoveBracesLLVM** (``Boolean``) :versionbadge:`clang-format 14`
+  Remove optional braces of control statements (``if``, ``else``, ``for``,
----------------
curdeius wrote:
> owenpan wrote:
> > MyDeveloperDay wrote:
> > > Can we agree on one set of options that can be used for both insertion and removal even if this patch only does removal 
> > > Can we agree on one set of options that can be used for both insertion and removal even if this patch only does removal 
> > 
> > One idea is to run insertion for all missing braces and then this option to remove the optional ones for LLVM, i.e., an `AutomaticBraces` if you will.
> Have you agreed upon this?
Not yet. We probably want to test inserting braces `Always` on check-clang if it's not already been done.


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

https://reviews.llvm.org/D116316



More information about the cfe-commits mailing list