================ @@ -2231,6 +2231,41 @@ struct FormatStyle { /// \version 3.7 bool BreakBeforeTernaryOperators; + /// Different ways to break binary operations. + enum BreakBinaryOperationsStyle : int8_t { + /// Don't break binary operations + /// \code + /// aaa + bbbb * ccccc - ddddd + + /// eeeeeeeeeeeeeeee; + /// \endcode + BBO_Never, + + /// Binary operations will either be all on the same line, or each operation + /// will have one line each. + /// \code + /// aaa + + /// bbbb * + /// ccccc - + /// ddddd + + /// eeeeeeeeeeeeeeee; + /// \endcode + BBO_BreakAll, + + /// Binary operations of a particular precedence that go beyond the column + /// limit will have one line each. + /// \code + /// aaa + + /// bbbb * ccccc - + /// ddddd + + /// eeeeeeeeeeeeeeee; + /// \endcode + BBO_BreakRespectPrecedence ---------------- owenca wrote:
```suggestion BBO_RespectPrecedence ``` https://github.com/llvm/llvm-project/pull/95013 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits