[clang] [clang-format] add BinPackLongBracedLists style option (PR #112482)
Gedare Bloom via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 20:34:26 PST 2025
gedare wrote:
> What about changing it to an option (e.g. `BinPackBracedListThreshold`) with a default value of about 20? If the number of elements in the list is more than the threshold, they will be bin packed even if `BinPackArguments` is set to false.
That was my original approach, but it is (marginally) more complex without a lot of obvious benefit to me, and it doesn't work well for small values, see https://github.com/llvm/llvm-project/pull/112482#issuecomment-2439664106
Since I did not find an open Issue about this topic, I leaned toward the less complex way of just allowing to enable/disable the currently hard-coded limit. I can make it a threshold instead, but I don't really want to find and fix the bugs that reveals.
https://github.com/llvm/llvm-project/pull/112482
More information about the cfe-commits
mailing list