@@ -1095,6 +1095,146 @@ the configuration (without a prefix: ``Auto``).
1095
1095
bbb >>= 2;
1096
1096
1097
1097
1098
+ .. _AlignConsecutiveTableGenDefinitionColons :
1099
+
1100
+ **AlignConsecutiveTableGenDefinitionColons ** (``AlignConsecutiveStyle ``) :versionbadge: `clang-format 19 ` :ref: `¶ <AlignConsecutiveTableGenDefinitionColons >`
1101
+ Style of aligning consecutive TableGen definition colons.
1102
+ This aligns the inheritance colons of consecutive definitions.
1103
+
1104
+ .. code-block :: c++
1105
+
1106
+ def Def : Parent {}
1107
+ def DefDef : Parent {}
1108
+ def DefDefDef : Parent {}
1109
+
1110
+ Nested configuration flags:
1111
+
1112
+ Alignment options.
1113
+
1114
+ They can also be read as a whole for compatibility. The choices are:
1115
+ - None
1116
+ - Consecutive
1117
+ - AcrossEmptyLines
1118
+ - AcrossComments
1119
+ - AcrossEmptyLinesAndComments
1120
+
1121
+ For example, to align across empty lines and not across comments, either
1122
+ of these work.
1123
+
1124
+ .. code-block :: c++
1125
+
1126
+ AlignConsecutiveMacros: AcrossEmptyLines
1127
+
1128
+ AlignConsecutiveMacros:
1129
+ Enabled: true
1130
+ AcrossEmptyLines: true
1131
+ AcrossComments: false
1132
+
1133
+ * ``bool Enabled `` Whether aligning is enabled.
1134
+
1135
+ .. code-block :: c++
1136
+
1137
+ #define SHORT_NAME 42
1138
+ #define LONGER_NAME 0x007f
1139
+ #define EVEN_LONGER_NAME (2)
1140
+ #define foo(x) (x * x)
1141
+ #define bar(y, z) (y + z)
1142
+
1143
+ int a = 1;
1144
+ int somelongname = 2;
1145
+ double c = 3;
1146
+
1147
+ int aaaa : 1;
1148
+ int b : 12;
1149
+ int ccc : 8;
1150
+
1151
+ int aaaa = 12;
1152
+ float b = 23;
1153
+ std::string ccc;
1154
+
1155
+ * ``bool AcrossEmptyLines `` Whether to align across empty lines.
1156
+
1157
+ .. code-block :: c++
1158
+
1159
+ true:
1160
+ int a = 1;
1161
+ int somelongname = 2;
1162
+ double c = 3;
1163
+
1164
+ int d = 3;
1165
+
1166
+ false:
1167
+ int a = 1;
1168
+ int somelongname = 2;
1169
+ double c = 3;
1170
+
1171
+ int d = 3;
1172
+
1173
+ * ``bool AcrossComments `` Whether to align across comments.
1174
+
1175
+ .. code-block :: c++
1176
+
1177
+ true:
1178
+ int d = 3;
1179
+ /* A comment. */
1180
+ double e = 4;
1181
+
1182
+ false:
1183
+ int d = 3;
1184
+ /* A comment. */
1185
+ double e = 4;
1186
+
1187
+ * ``bool AlignCompound `` Only for ``AlignConsecutiveAssignments ``. Whether compound assignments
1188
+ like ``+= `` are aligned along with ``= ``.
1189
+
1190
+ .. code-block :: c++
1191
+
1192
+ true:
1193
+ a &= 2;
1194
+ bbb = 2;
1195
+
1196
+ false:
1197
+ a &= 2;
1198
+ bbb = 2;
1199
+
1200
+ * ``bool AlignFunctionPointers `` Only for ``AlignConsecutiveDeclarations ``. Whether function pointers are
1201
+ aligned.
1202
+
1203
+ .. code-block :: c++
1204
+
1205
+ true:
1206
+ unsigned i;
1207
+ int &r;
1208
+ int *p;
1209
+ int (*f)();
1210
+
1211
+ false:
1212
+ unsigned i;
1213
+ int &r;
1214
+ int *p;
1215
+ int (*f)();
1216
+
1217
+ * ``bool PadOperators `` Only for ``AlignConsecutiveAssignments ``. Whether short assignment
1218
+ operators are left-padded to the same length as long ones in order to
1219
+ put all assignment operators to the right of the left hand side.
1220
+
1221
+ .. code-block :: c++
1222
+
1223
+ true:
1224
+ a >>= 2;
1225
+ bbb = 2;
1226
+
1227
+ a = 2;
1228
+ bbb >>= 2;
1229
+
1230
+ false:
1231
+ a >>= 2;
1232
+ bbb = 2;
1233
+
1234
+ a = 2;
1235
+ bbb >>= 2;
1236
+
1237
+
1098
1238
.. _AlignEscapedNewlines :
1099
1239
1100
1240
**AlignEscapedNewlines ** (``EscapedNewlineAlignmentStyle ``) :versionbadge: `clang-format 5 ` :ref: `¶ <AlignEscapedNewlines >`
0 commit comments