[clang] [clang-format] Add option to omit wrapping for empty records (PR #151970)

Tomáš Slanina via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 11 07:30:46 PDT 2025


================
@@ -1585,6 +1611,8 @@ struct FormatStyle {
     /// \endcode
     ///
     bool SplitEmptyNamespace;
+    /// Wrap empty record (``class``/``struct``/``union``).
+    BraceWrapEmptyRecordStyle WrapEmptyRecord;
----------------
itzexpoexpo wrote:

I agree the options are related closely enough to warrant it. But I'm unsure about breaking existing behavior, would this mean deprecating SplitEmptyRecord and having something like WrapAndSplitEmptyRecord instead?

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


More information about the cfe-commits mailing list