[clang] [clang-format] Add AlignConsecutiveEnums (PR #194154)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 25 12:09:47 PDT 2026


================
@@ -301,6 +301,17 @@ struct FormatStyle {
   /// \endcode
   /// \version 11
   AlignConsecutiveStyle AlignConsecutiveBitFields;
+  /// Style of aligning consecutive enum assignments.
+  ///
+  /// ``Consecutive`` will align the enum assignments of consecutive lines.
+  /// This will result in formattings like:
+  /// \code
+  ///   flag_aaaa = 1,
+  ///   flag_b    = 12,
+  ///   flag_ccc  = 8,
+  /// \endcode
+  /// \version 23
+  AlignConsecutiveStyle AlignConsecutiveEnums;
----------------
HazardyKnusperkeks wrote:

Options have to be sorted alphabetically.

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


More information about the cfe-commits mailing list