@@ -48,39 +48,53 @@ template <> struct MappingTraits<FormatStyle::AlignConsecutiveStyle> {
4848 FormatStyle::AlignConsecutiveStyle (
4949 {/* Enabled=*/ false , /* AcrossEmptyLines=*/ false ,
5050 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
51- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
51+ /* AlignFunctionPointers=*/ false ,
52+ /* AlignFunctionDeclarations=*/ true ,
53+ /* PadOperators=*/ true }));
5254 IO.enumCase (Value, " Consecutive" ,
5355 FormatStyle::AlignConsecutiveStyle (
5456 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
5557 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
56- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
58+ /* AlignFunctionPointers=*/ false ,
59+ /* AlignFunctionDeclarations=*/ true ,
60+ /* PadOperators=*/ true }));
5761 IO.enumCase (Value, " AcrossEmptyLines" ,
5862 FormatStyle::AlignConsecutiveStyle (
5963 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
6064 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
61- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
65+ /* AlignFunctionPointers=*/ false ,
66+ /* AlignFunctionDeclarations=*/ true ,
67+ /* PadOperators=*/ true }));
6268 IO.enumCase (Value, " AcrossComments" ,
6369 FormatStyle::AlignConsecutiveStyle (
6470 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
6571 /* AcrossComments=*/ true , /* AlignCompound=*/ false ,
66- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
72+ /* AlignFunctionPointers=*/ false ,
73+ /* AlignFunctionDeclarations=*/ true ,
74+ /* PadOperators=*/ true }));
6775 IO.enumCase (Value, " AcrossEmptyLinesAndComments" ,
6876 FormatStyle::AlignConsecutiveStyle (
6977 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
7078 /* AcrossComments=*/ true , /* AlignCompound=*/ false ,
71- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
79+ /* AlignFunctionPointers=*/ false ,
80+ /* AlignFunctionDeclarations=*/ true ,
81+ /* PadOperators=*/ true }));
7282
7383 // For backward compatibility.
7484 IO.enumCase (Value, " true" ,
7585 FormatStyle::AlignConsecutiveStyle (
7686 {/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
7787 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
78- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
88+ /* AlignFunctionPointers=*/ false ,
89+ /* AlignFunctionDeclarations=*/ true ,
90+ /* PadOperators=*/ true }));
7991 IO.enumCase (Value, " false" ,
8092 FormatStyle::AlignConsecutiveStyle (
8193 {/* Enabled=*/ false , /* AcrossEmptyLines=*/ false ,
8294 /* AcrossComments=*/ false , /* AlignCompound=*/ false ,
83- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
95+ /* AlignFunctionPointers=*/ false ,
96+ /* AlignFunctionDeclarations=*/ true ,
97+ /* PadOperators=*/ true }));
8498 }
8599
86100 static void mapping (IO &IO, FormatStyle::AlignConsecutiveStyle &Value) {
@@ -89,6 +103,8 @@ template <> struct MappingTraits<FormatStyle::AlignConsecutiveStyle> {
89103 IO.mapOptional (" AcrossComments" , Value.AcrossComments );
90104 IO.mapOptional (" AlignCompound" , Value.AlignCompound );
91105 IO.mapOptional (" AlignFunctionPointers" , Value.AlignFunctionPointers );
106+ IO.mapOptional (" AlignFunctionDeclarations" ,
107+ Value.AlignFunctionDeclarations );
92108 IO.mapOptional (" PadOperators" , Value.PadOperators );
93109 }
94110};
@@ -1448,6 +1464,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
14481464 LLVMStyle.AlignConsecutiveAssignments .PadOperators = true ;
14491465 LLVMStyle.AlignConsecutiveBitFields = {};
14501466 LLVMStyle.AlignConsecutiveDeclarations = {};
1467+ LLVMStyle.AlignConsecutiveDeclarations .AlignFunctionDeclarations = true ;
14511468 LLVMStyle.AlignConsecutiveMacros = {};
14521469 LLVMStyle.AlignConsecutiveShortCaseStatements = {};
14531470 LLVMStyle.AlignConsecutiveTableGenBreakingDAGArgColons = {};
0 commit comments