@@ -48,46 +48,62 @@ template <> struct MappingTraits<FormatStyle::AlignConsecutiveStyle> {
48
48
FormatStyle::AlignConsecutiveStyle (
49
49
{/* Enabled=*/ false , /* AcrossEmptyLines=*/ false ,
50
50
/* AcrossComments=*/ false , /* AlignCompound=*/ false ,
51
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
51
+ /* AlignFunctionDeclarations=*/ true ,
52
+ /* AlignFunctionPointers=*/ false ,
53
+ /* PadOperators=*/ true }));
52
54
IO.enumCase (Value, " Consecutive" ,
53
55
FormatStyle::AlignConsecutiveStyle (
54
56
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
55
57
/* AcrossComments=*/ false , /* AlignCompound=*/ false ,
56
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
58
+ /* AlignFunctionDeclarations=*/ true ,
59
+ /* AlignFunctionPointers=*/ false ,
60
+ /* PadOperators=*/ true }));
57
61
IO.enumCase (Value, " AcrossEmptyLines" ,
58
62
FormatStyle::AlignConsecutiveStyle (
59
63
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
60
64
/* AcrossComments=*/ false , /* AlignCompound=*/ false ,
61
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
65
+ /* AlignFunctionDeclarations=*/ true ,
66
+ /* AlignFunctionPointers=*/ false ,
67
+ /* PadOperators=*/ true }));
62
68
IO.enumCase (Value, " AcrossComments" ,
63
69
FormatStyle::AlignConsecutiveStyle (
64
70
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
65
71
/* AcrossComments=*/ true , /* AlignCompound=*/ false ,
66
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
72
+ /* AlignFunctionDeclarations=*/ true ,
73
+ /* AlignFunctionPointers=*/ false ,
74
+ /* PadOperators=*/ true }));
67
75
IO.enumCase (Value, " AcrossEmptyLinesAndComments" ,
68
76
FormatStyle::AlignConsecutiveStyle (
69
77
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
70
78
/* AcrossComments=*/ true , /* AlignCompound=*/ false ,
71
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
79
+ /* AlignFunctionDeclarations=*/ true ,
80
+ /* AlignFunctionPointers=*/ false ,
81
+ /* PadOperators=*/ true }));
72
82
73
83
// For backward compatibility.
74
84
IO.enumCase (Value, " true" ,
75
85
FormatStyle::AlignConsecutiveStyle (
76
86
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
77
87
/* AcrossComments=*/ false , /* AlignCompound=*/ false ,
78
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
88
+ /* AlignFunctionDeclarations=*/ true ,
89
+ /* AlignFunctionPointers=*/ false ,
90
+ /* PadOperators=*/ true }));
79
91
IO.enumCase (Value, " false" ,
80
92
FormatStyle::AlignConsecutiveStyle (
81
93
{/* Enabled=*/ false , /* AcrossEmptyLines=*/ false ,
82
94
/* AcrossComments=*/ false , /* AlignCompound=*/ false ,
83
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
95
+ /* AlignFunctionDeclarations=*/ true ,
96
+ /* AlignFunctionPointers=*/ false ,
97
+ /* PadOperators=*/ true }));
84
98
}
85
99
86
100
static void mapping (IO &IO, FormatStyle::AlignConsecutiveStyle &Value) {
87
101
IO.mapOptional (" Enabled" , Value.Enabled );
88
102
IO.mapOptional (" AcrossEmptyLines" , Value.AcrossEmptyLines );
89
103
IO.mapOptional (" AcrossComments" , Value.AcrossComments );
90
104
IO.mapOptional (" AlignCompound" , Value.AlignCompound );
105
+ IO.mapOptional (" AlignFunctionDeclarations" ,
106
+ Value.AlignFunctionDeclarations );
91
107
IO.mapOptional (" AlignFunctionPointers" , Value.AlignFunctionPointers );
92
108
IO.mapOptional (" PadOperators" , Value.PadOperators );
93
109
}
@@ -1448,6 +1464,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
1448
1464
LLVMStyle.AlignConsecutiveAssignments .PadOperators = true ;
1449
1465
LLVMStyle.AlignConsecutiveBitFields = {};
1450
1466
LLVMStyle.AlignConsecutiveDeclarations = {};
1467
+ LLVMStyle.AlignConsecutiveDeclarations .AlignFunctionDeclarations = true ;
1451
1468
LLVMStyle.AlignConsecutiveMacros = {};
1452
1469
LLVMStyle.AlignConsecutiveShortCaseStatements = {};
1453
1470
LLVMStyle.AlignConsecutiveTableGenBreakingDAGArgColons = {};
0 commit comments