[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 7 01:24:58 PDT 2024


owenca wrote:

> When you say rename, do you mean deprecate `BinPackParameters` like in these changes [6739bb5](https://github.com/llvm/llvm-project/commit/6739bb5006bc28e2bdbdb2326eb2c957546634aa) but using `BreakParameters` and `Never`/`OnePerLine`/`Always` for the names?

Yes, deprecate `BinPackParameters` and rename it to either `PackParameters` (with `enum` values `Leave`, `Always`, `OnePerLine`, and `Never`) or `BreakParameters` (with `enum` values `Leave`, `Never`, `OnePerLine`, and `Always`). I don't really like `OnePerLine` but can't think of a better alternative that's not wordy. If adding `Leave` is not trivial, we can support it in another patch.

Have you given any thought about https://github.com/llvm/llvm-project/issues/53190#issuecomment-1973631975?

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


More information about the cfe-commits mailing list