=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -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:
Like I said, we have both singular (e.g. `CompoundRequirement`) and plural in
`AllowShort...OnASingleLine`. I'm not sure if it's worth it to deprecate (in a
separate patch) the plural ones.
https://github.com/llvm/llvm-project/pull/154580
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits