[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 20 08:52:39 PDT 2024


================
@@ -134,6 +134,19 @@ template <> struct ScalarEnumerationTraits<FormatStyle::BinaryOperatorStyle> {
   }
 };
 
+template <>
+struct ScalarEnumerationTraits<FormatStyle::BinPackParametersStyle> {
+  static void enumeration(IO &IO, FormatStyle::BinPackParametersStyle &Value) {
+    IO.enumCase(Value, "OnePerLine", FormatStyle::BPPS_OnePerLine);
+    IO.enumCase(Value, "BinPack", FormatStyle::BPPS_BinPack);
----------------
owenca wrote:

```suggestion
    IO.enumCase(Value, "BinPack", FormatStyle::BPPS_BinPack);
    IO.enumCase(Value, "OnePerLine", FormatStyle::BPPS_OnePerLine);
```

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


More information about the cfe-commits mailing list