@@ -44,50 +44,54 @@ struct ScalarEnumerationTraits<FormatStyle::BreakBeforeNoexceptSpecifierStyle> {
4444
4545template <> struct MappingTraits <FormatStyle::AlignConsecutiveStyle> {
4646 static void enumInput (IO &IO, FormatStyle::AlignConsecutiveStyle &Value) {
47- IO.enumCase (Value, " None" ,
48- FormatStyle::AlignConsecutiveStyle (
49- {/* Enabled=*/ false , /* AcrossEmptyLines=*/ false ,
50- /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
51- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
47+ IO.enumCase (Value, " None" , FormatStyle::AlignConsecutiveStyle ({}));
5248 IO.enumCase (Value, " Consecutive" ,
5349 FormatStyle::AlignConsecutiveStyle (
5450 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
5551 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
56- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
52+ /* AlignFunctionDeclarations=*/ true ,
53+ /* AlignFunctionPointers=*/ false ,
54+ /* PadOperators=*/ true }));
5755 IO.enumCase (Value, " AcrossEmptyLines" ,
5856 FormatStyle::AlignConsecutiveStyle (
5957 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
6058 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
61- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
59+ /* AlignFunctionDeclarations=*/ true ,
60+ /* AlignFunctionPointers=*/ false ,
61+ /* PadOperators=*/ true }));
6262 IO.enumCase (Value, " AcrossComments" ,
6363 FormatStyle::AlignConsecutiveStyle (
6464 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
6565 /* AcrossComments=*/ true , /* AlignCompound=*/ false ,
66- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
66+ /* AlignFunctionDeclarations=*/ true ,
67+ /* AlignFunctionPointers=*/ false ,
68+ /* PadOperators=*/ true }));
6769 IO.enumCase (Value, " AcrossEmptyLinesAndComments" ,
6870 FormatStyle::AlignConsecutiveStyle (
6971 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
7072 /* AcrossComments=*/ true , /* AlignCompound=*/ false ,
71- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
73+ /* AlignFunctionDeclarations=*/ true ,
74+ /* AlignFunctionPointers=*/ false ,
75+ /* PadOperators=*/ true }));
7276
7377 // For backward compatibility.
7478 IO.enumCase (Value, " true" ,
7579 FormatStyle::AlignConsecutiveStyle (
7680 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
7781 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
78- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
79- IO.enumCase (Value, " false" ,
80- FormatStyle::AlignConsecutiveStyle (
81- {/* Enabled=*/ false , /* AcrossEmptyLines=*/ false ,
82- /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
83- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
82+ /* AlignFunctionDeclarations=*/ true ,
83+ /* AlignFunctionPointers=*/ false ,
84+ /* PadOperators=*/ true }));
85+ IO.enumCase (Value, " false" , FormatStyle::AlignConsecutiveStyle ({}));
8486 }
8587
8688 static void mapping (IO &IO, FormatStyle::AlignConsecutiveStyle &Value) {
8789 IO.mapOptional (" Enabled" , Value.Enabled );
8890 IO.mapOptional (" AcrossEmptyLines" , Value.AcrossEmptyLines );
8991 IO.mapOptional (" AcrossComments" , Value.AcrossComments );
9092 IO.mapOptional (" AlignCompound" , Value.AlignCompound );
93+ IO.mapOptional (" AlignFunctionDeclarations" ,
94+ Value.AlignFunctionDeclarations );
9195 IO.mapOptional (" AlignFunctionPointers" , Value.AlignFunctionPointers );
9296 IO.mapOptional (" PadOperators" , Value.PadOperators );
9397 }
@@ -1449,6 +1453,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
14491453 LLVMStyle.AlignConsecutiveAssignments .PadOperators = true ;
14501454 LLVMStyle.AlignConsecutiveBitFields = {};
14511455 LLVMStyle.AlignConsecutiveDeclarations = {};
1456+ LLVMStyle.AlignConsecutiveDeclarations .AlignFunctionDeclarations = true ;
14521457 LLVMStyle.AlignConsecutiveMacros = {};
14531458 LLVMStyle.AlignConsecutiveShortCaseStatements = {};
14541459 LLVMStyle.AlignConsecutiveTableGenBreakingDAGArgColons = {};
0 commit comments