=?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/154...@github.com>


================
@@ -992,6 +992,32 @@ struct FormatStyle {
   /// \version 20
   bool AllowShortNamespacesOnASingleLine;
 
+  /// Different styles for merging short records
+  /// (``class``,``struct``,``union``).
+  enum ShortRecordStyle : int8_t {
+    /// Never merge records into a single line.
+    SRS_Never,
+    /// Only merge empty records.
+    /// \code
+    ///   struct foo {};
+    ///   struct bar
+    ///   {
+    ///     int i;
+    ///   };
+    /// \endcode
+    SRS_Empty,
+    /// Merge all records that fit on a single line.
+    /// \code
+    ///   struct foo {};
+    ///   struct bar { int i; };
+    /// \endcode
+    SRS_All
+  };
+
+  /// Dependent on the value, ``struct bar { int i; }`` can be put on a single
+  /// line.
+  ShortRecordStyle AllowShortRecordsOnASingleLine;
----------------
owenca wrote:

```suggestion
  ShortRecordStyle AllowShortRecordOnASingleLine;
```
We have both singular and plural, but the former is more precise IMO as we 
don't put multiple short records on a single line.

https://github.com/llvm/llvm-project/pull/154580
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to