<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58125>58125</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Feature request: bin packing boolean expressions, similar to BinPackArguments
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          3geek14
      </td>
    </tr>
</table>

<pre>
    It's common to have several boolean operators all combined with `&&` or `||` that can't fit onto one line. As far as I can tell, it appears that there's no way to control how clang-format wraps the conditions. I would like something similar to BinPackArguments and BinPackParameters that I can toggle so that I can get code more like the following:

    public bool Equals(Thing other) {
      return PropA == other.PropA
          && PropB == other.PropB
          && VeryLongPropertyName == other.VeryLongPropertyName;
    }

    if (cond1
        || cond2
        || cond3
        || veryLongConditionName)

I saw `BreakBeforeBinaryOperators` and thought that might achieve this, but it appears to only affect whether line breaks are before/after operators *if clang-format already wants to break a line there*.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VMFu2zgQ_RrqMqghUZZsH3SwkwYIUGxzWOx9JI0kNhSpklS8_vsO6Rh1dtsKhC2Sj_PecN6otf2leQ5C7jx0dp6tgWBhwjcCT2_kUENrrSY0YBeeBus8oNYR3CpDPZxVmEDUuZB1HHUO1qX57iEOnocJA3RomCTAoAJYwxzWEGiOsIGjhwEdoIfnCINAWgv5AIzEZSFkxhQiTOQoKTUWzniJSjuO5ayGyZ6h02jGT4N1M4PPDpd4jiKkV0FZ4zdMcLar7pn4lRO0M4VJmRG8mpVmCRzwpMwLdq9HN64zmcDJmv62-IIO-QjdBL3LteOoY7T7xZE4ZdsTzNbRlS5qGazW9syUojyK_FHk77_Az7K2WnXpuuHz9xW1F3L_d9JnY-pCHkDsTj8PADgKqzPw4uxyBFE-8rhiN2npHhqfa4kS_PR_-Ok38H_IXb5YM0YMuXD5i-_g4-lfIUR5F0_sHv-brRo4_j7WpvjIe_VNqpr87U75y523dx0Pt4onIfJwz_0MHs_RnydH-HoitgtxedFdvt78HT0bqx4mu45TuJZ1VvEVu0lxW_CS8tGi7Ro-2DTaWl8Ah4E69uBE8X6SzaGNfGwntkObWIV8woHNdNdYQh75Xj74GDWf6y_s92hGJkhxAK9B31viuMmoKep6u8_rqiqzvin7Q3nALKigqXkiZJ8Q2-X7Sj6w94B7Fxa2dHTXrcHp38WR97FTYm5_aIpsdbqZQlh89LF84jHyZ2BtN_xZ4InWb7e_T4uz3_gyeKq8Z3p-qfaFrLKpaev8QEW5JznQ0G5xV-x3BSdRy7zDrqJMY0vaN6I6CSkNnSGF4HdRPWaqkbmURZ6XxbaoKrmR2JZ13haHXdVt6VCLbU4zKr2JOjbWjZlrkqR2HT1vauWD_7mJnPpoiBIdx8eVDeCaciR6LbZZom6S9B-jBawA">