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

Jesses Gott via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 24 09:00:01 PST 2021


jessesna added a comment.

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> .


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