[clang] [clang-format] Fix breaking enum braces when combined with export (PR #189128)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 28 08:27:39 PDT 2026


================
@@ -2885,6 +2885,22 @@ TEST_F(FormatTest, ShortEnums) {
                "  C\n"
                "} ShortEnum1, ShortEnum2;",
                Style);
+
+  Style.AllowShortEnumsOnASingleLine = true;
+  verifyFormat("enum\n"
+               "{\n"
+               "  A,\n"
+               "  B,\n"
+               "  C\n"
+               "} ShortEnum1, ShortEnum2;",
----------------
HazardyKnusperkeks wrote:

I agree, but I wanted to use the same enum as all the other formats in this test and don't add the "wrong" formatting, just to fix it with the next PR.

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


More information about the cfe-commits mailing list