@@ -48,39 +48,53 @@ 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
+ /* AlignFunctionPointers=*/ false ,
52
+ /* AlignFunctionDeclarations=*/ true ,
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
+ /* AlignFunctionPointers=*/ false ,
59
+ /* AlignFunctionDeclarations=*/ true ,
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
+ /* AlignFunctionPointers=*/ false ,
66
+ /* AlignFunctionDeclarations=*/ true ,
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
+ /* AlignFunctionPointers=*/ false ,
73
+ /* AlignFunctionDeclarations=*/ true ,
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
+ /* AlignFunctionPointers=*/ false ,
80
+ /* AlignFunctionDeclarations=*/ true ,
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
+ /* AlignFunctionPointers=*/ false ,
89
+ /* AlignFunctionDeclarations=*/ true ,
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
+ /* AlignFunctionPointers=*/ false ,
96
+ /* AlignFunctionDeclarations=*/ true ,
97
+ /* PadOperators=*/ true }));
84
98
}
85
99
86
100
static void mapping (IO &IO, FormatStyle::AlignConsecutiveStyle &Value) {
@@ -89,6 +103,8 @@ template <> struct MappingTraits<FormatStyle::AlignConsecutiveStyle> {
89
103
IO.mapOptional (" AcrossComments" , Value.AcrossComments );
90
104
IO.mapOptional (" AlignCompound" , Value.AlignCompound );
91
105
IO.mapOptional (" AlignFunctionPointers" , Value.AlignFunctionPointers );
106
+ IO.mapOptional (" AlignFunctionDeclarations" ,
107
+ Value.AlignFunctionDeclarations );
92
108
IO.mapOptional (" PadOperators" , Value.PadOperators );
93
109
}
94
110
};
@@ -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