Before this change enums were formatted incorrectly for the Microsoft style.
[C++ Example]
enum {
one,
two
} three, four;[Incorrectly Formatted]
enum
{
one,
two
} three,
four;[Correct Format with Patch]
enum
{
one,
two
} three, four;
You'll need to fix up the C# tests
C:/llvm-project/clang/unittests/Format/FormatTestCSharp.cpp(48): error: Expected: Code.str() Which is: "public enum var { none, @string, bool, @enum }" To be equal to: format(Code, Style) Which is: "public enum var\n{\n none,\n @string,\n bool,\n @enum\n}" With diff: @@ -1,1 +1,7 @@ -public enum var { none, @string, bool, @enum } +public enum var +{ + none, + @string, + bool, + @enum +}I think that is ok as most of the documentation seems to show them not on a single line
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/enum