[PATCH] D139211: [WIP][clang-format] Properly handle the C11 _Generic keyword.

Emilia Dreamer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 2 10:29:40 PST 2022


rymiel added a comment.

I put WIP in the title right now because firstly, I still need to write more tests, but also, since I haven't touched the breaking and indenting part of the code before, I want to make sure what I'm doing is sensible.

Basically, after making the colons their own type so that they no longer followed the rules of InlineASMColon, I noticed the output was perfect on its own if passed `BinPackArgument: false` as a style option. Following this train of thought, I simply let generic selection expressions act as if regular call-like expressions, but with binpack always forcefully disabled.

Not sure if that's something that should even be done (i.e. leave it just up to BinPackArgument), or configurable, or etc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139211



More information about the cfe-commits mailing list