@@ -44,50 +44,54 @@ struct ScalarEnumerationTraits<FormatStyle::BreakBeforeNoexceptSpecifierStyle> {
44
44
45
45
template <> struct MappingTraits <FormatStyle::AlignConsecutiveStyle> {
46
46
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 ({}));
52
48
IO.enumCase (Value, " Consecutive" ,
53
49
FormatStyle::AlignConsecutiveStyle (
54
50
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
55
51
/* AcrossComments=*/ false , /* AlignCompound=*/ false ,
56
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
52
+ /* AlignFunctionDeclarations=*/ true ,
53
+ /* AlignFunctionPointers=*/ false ,
54
+ /* PadOperators=*/ true }));
57
55
IO.enumCase (Value, " AcrossEmptyLines" ,
58
56
FormatStyle::AlignConsecutiveStyle (
59
57
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
60
58
/* AcrossComments=*/ false , /* AlignCompound=*/ false ,
61
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
59
+ /* AlignFunctionDeclarations=*/ true ,
60
+ /* AlignFunctionPointers=*/ false ,
61
+ /* PadOperators=*/ true }));
62
62
IO.enumCase (Value, " AcrossComments" ,
63
63
FormatStyle::AlignConsecutiveStyle (
64
64
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
65
65
/* AcrossComments=*/ true , /* AlignCompound=*/ false ,
66
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
66
+ /* AlignFunctionDeclarations=*/ true ,
67
+ /* AlignFunctionPointers=*/ false ,
68
+ /* PadOperators=*/ true }));
67
69
IO.enumCase (Value, " AcrossEmptyLinesAndComments" ,
68
70
FormatStyle::AlignConsecutiveStyle (
69
71
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ true ,
70
72
/* AcrossComments=*/ true , /* AlignCompound=*/ false ,
71
- /* AlignFunctionPointers=*/ false , /* PadOperators=*/ true }));
73
+ /* AlignFunctionDeclarations=*/ true ,
74
+ /* AlignFunctionPointers=*/ false ,
75
+ /* PadOperators=*/ true }));
72
76
73
77
// For backward compatibility.
74
78
IO.enumCase (Value, " true" ,
75
79
FormatStyle::AlignConsecutiveStyle (
76
80
{/* Enabled=*/ true , /* AcrossEmptyLines=*/ false ,
77
81
/* 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 ({}));
84
86
}
85
87
86
88
static void mapping (IO &IO, FormatStyle::AlignConsecutiveStyle &Value) {
87
89
IO.mapOptional (" Enabled" , Value.Enabled );
88
90
IO.mapOptional (" AcrossEmptyLines" , Value.AcrossEmptyLines );
89
91
IO.mapOptional (" AcrossComments" , Value.AcrossComments );
90
92
IO.mapOptional (" AlignCompound" , Value.AlignCompound );
93
+ IO.mapOptional (" AlignFunctionDeclarations" ,
94
+ Value.AlignFunctionDeclarations );
91
95
IO.mapOptional (" AlignFunctionPointers" , Value.AlignFunctionPointers );
92
96
IO.mapOptional (" PadOperators" , Value.PadOperators );
93
97
}
@@ -1449,6 +1453,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
1449
1453
LLVMStyle.AlignConsecutiveAssignments .PadOperators = true ;
1450
1454
LLVMStyle.AlignConsecutiveBitFields = {};
1451
1455
LLVMStyle.AlignConsecutiveDeclarations = {};
1456
+ LLVMStyle.AlignConsecutiveDeclarations .AlignFunctionDeclarations = true ;
1452
1457
LLVMStyle.AlignConsecutiveMacros = {};
1453
1458
LLVMStyle.AlignConsecutiveShortCaseStatements = {};
1454
1459
LLVMStyle.AlignConsecutiveTableGenBreakingDAGArgColons = {};
0 commit comments