[PATCH] D95168: [clang-format] Add InsertBraces option

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 3 04:20:57 PDT 2021


MyDeveloperDay added a comment.

@tiagoma are you still interested in pursuing this? I have some suggestions

1. I'd like to move the BraceInserter Into its own .cpp and .h files (like I did with the QualifierAlignmentFixer)
2. I'd like to move the unit tests into their own .cpp file  (because I think we need to actually unit tests their functions of BraceInserter more than just testing if via verfiyFormat and I think its cleaner as FormatTest.cpp is very large)
3. I'd like to see what it would take to remove braces, (eliding the braces on small ifs and control statements is about the number one review comments in LLVM)

I feel like we've general community agreement that clang-format can modify the tokens (following the RFC around QualifierAlignmentFixer) as long as the documentation carries a clear warning and its off by default.

If you are no longer interested in landing this, I am happy to consider taking it on.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95168



More information about the cfe-commits mailing list