[PATCH] D95168: [clang-format] Add InsertBraces option
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 4 00:13:32 PDT 2021
MyDeveloperDay added a comment.
In D95168#3039033 <https://reviews.llvm.org/D95168#3039033>, @owenpan wrote:
> In D95168#3038531 <https://reviews.llvm.org/D95168#3038531>, @MyDeveloperDay wrote:
>
>> @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)
>
> Eliding braces would be much more complicated and should be tackled separately. Below are just some examples:
>
>
I agree with that, to be honest I work in an organization where we'd only ever be inserting them, but I think anyone conforming to LLVM style could appreciate a removal option, but yes lets do that separately.
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