[clang] [clang-format] Apply SpaceBeforeInheritanceColon to enum underlying types (PR #189011)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 27 12:53:24 PDT 2026


================
@@ -18632,6 +18632,18 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeColon) {
                InvertedSpaceStyle);
 }
 
+TEST_F(FormatTest, EnumUnderlyingTypeUsesInheritanceColonSpacing) {
+  FormatStyle Style = getLLVMStyle();
+
+  Style.SpaceBeforeInheritanceColon = true;
+  verifyFormat("enum A : int {};", Style);
----------------
HazardyKnusperkeks wrote:

Can you add with and without `typedef` and an enum name?

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


More information about the cfe-commits mailing list