[PATCH] D114320: [clang-format] Extend AllowShortBlocksOnASingleLine for else blocks

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 24 11:43:35 PST 2021


MyDeveloperDay accepted this revision.
MyDeveloperDay added a comment.
This revision is now accepted and ready to land.

In D114320#3151741 <https://reviews.llvm.org/D114320#3151741>, @jessesna wrote:

> In D114320#3148046 <https://reviews.llvm.org/D114320#3148046>, @MyDeveloperDay wrote:
>
>> Ok now I'm a little puzzled, shouldn't this be covered by `AllowShortIfStatementsOnASingleLine`?
>
> That's exactly what i thought when i first stumbled over the behavior :D But I think the majority of users might not even consider adding empty else blocks. Only a few either just do it or have to comply with some standards, f.e. MISRA <https://stackoverflow.com/a/35053448/1280961> .

I tend to agree with you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114320



More information about the cfe-commits mailing list