@@ -399,6 +399,8 @@ template <> struct MappingTraits<FormatStyle> {
399399 Style.AllowAllConstructorInitializersOnNextLine );
400400 IO.mapOptional (" AllowAllParametersOfDeclarationOnNextLine" ,
401401 Style.AllowAllParametersOfDeclarationOnNextLine );
402+ IO.mapOptional (" AllowShortEnumsOnASingleLine" ,
403+ Style.AllowShortEnumsOnASingleLine );
402404 IO.mapOptional (" AllowShortBlocksOnASingleLine" ,
403405 Style.AllowShortBlocksOnASingleLine );
404406 IO.mapOptional (" AllowShortCaseLabelsOnASingleLine" ,
@@ -754,6 +756,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
754756 LLVMStyle.AllowAllArgumentsOnNextLine = true ;
755757 LLVMStyle.AllowAllConstructorInitializersOnNextLine = true ;
756758 LLVMStyle.AllowAllParametersOfDeclarationOnNextLine = true ;
759+ LLVMStyle.AllowShortEnumsOnASingleLine = true ;
757760 LLVMStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
758761 LLVMStyle.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
759762 LLVMStyle.AllowShortCaseLabelsOnASingleLine = false ;
@@ -1139,6 +1142,7 @@ FormatStyle getMicrosoftStyle(FormatStyle::LanguageKind Language) {
11391142 Style.BraceWrapping .BeforeCatch = true ;
11401143 Style.BraceWrapping .BeforeElse = true ;
11411144 Style.PenaltyReturnTypeOnItsOwnLine = 1000 ;
1145+ Style.AllowShortEnumsOnASingleLine = false ;
11421146 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
11431147 Style.AllowShortCaseLabelsOnASingleLine = false ;
11441148 Style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;
0 commit comments