[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 13:03:30 PDT 2024


================
@@ -2193,6 +2193,41 @@ struct FormatStyle {
   /// \version 3.7
   bool BreakBeforeTernaryOperators;
 
+  /// Different ways to Break Between Chevrons.
+  enum BreakChevronOperatorStyle : int8_t {
+    /// Break using ColumnLimit rules.
+    /// \code
+    ///   os << "aaaaa" << "bbbbb" << "\n";
+    /// \endcode
+    BCOS_Never,
+    /// Break between adjacent strings.
+    /// \code
+    ///   os << "aaaaa"
+    ///      << "bbbbb"
+    ///      << "\n";
+    /// \endcode
+    BCOS_BetweenStrings,
+    /// Break between adjacent strings that end with \n.
+    /// \code
+    ///   os << "aaaaa\n"
+    ///      << "bbbbb" << "ccccc\n"
+    ///      << "\n";
+    /// \endcode
+    BCOS_BetweenNewlineStrings,
+    /// Break between adjacent chevrons.
+    /// \code
+    ///   os << "aaaaa\n"
+    ///      << "bbbbb"
+    ///      << "ccccc\n"
+    ///      << "\n";
+    /// \endcode
+    BCOS_Always
+  };
+
+  /// Break Between Chevron Operators
----------------
HazardyKnusperkeks wrote:

```suggestion
  /// Break Between Chevron Operators.
```

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


More information about the cfe-commits mailing list