[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 21:00:55 PDT 2024


owenca wrote:

It seems that this patch implements the new option without regard to the relative precedence of the binary operators:
```
$ cat bar.cc
foooooooooooo1 = foooooooooooo2 * foooooooooooo3 +
                 foooooooooooo4 / foooooooooooo5 - foooooooooooo6;
$ clang-format -style='{BinPackBinaryOperations: false}' bar.cc
foooooooooooo1 = foooooooooooo2 *
                 foooooooooooo3 +
                 foooooooooooo4 /
                 foooooooooooo5 -
                 foooooooooooo6;
$ 
```
@mydeveloperday @HazardyKnusperkeks @rymiel are you okay with this?

https://github.com/llvm/llvm-project/pull/95013


More information about the cfe-commits mailing list