[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 23:13:48 PDT 2024
================
@@ -403,13 +416,29 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) {
verifyFormat("f(/* aaaaaaaaaaaaaaaaaa = */\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);");
- FormatStyle NoBinPacking = getLLVMStyle();
- NoBinPacking.BinPackParameters = false;
+ verifyFormat(
+ "int aaaaaaaaaaaaa(/* 1st */ int bbbbbbbbbb, /* 2nd */ int ccccccccccc,\n"
+ " /* 3rd */ int dddddddddddd);");
+
+ auto Style = getLLVMStyle();
+ Style.BinPackParameters = FormatStyle::BPPS_OnePerLine;
----------------
owenca wrote:
```suggestion
Style.BinPackArguments = false;
```
https://github.com/llvm/llvm-project/pull/101882
More information about the cfe-commits
mailing list