@@ -62,86 +62,38 @@ struct FormatStyle {
62
62
// / \version 3.3
63
63
int AccessModifierOffset;
64
64
65
- // / Different styles for breaking the parenthesis after ``if/else if``.
65
+ // / Force break after the left parenthesis of an if control statement
66
+ // / when the expression exceeds the column limit.
67
+ // / \code
68
+ // / true: false:
69
+ // / if constexpr ( vs. if constexpr (a ||
70
+ // / a || b)
71
+ // / b)
72
+ // / \endcode
66
73
// / \version 21
67
- enum BreakAfterOpenBracketIfStyle : int8_t {
68
- // / Always break the opening parenthesis of an if statement, e.g.:
69
- // / \code
70
- // / if constexpr (
71
- // / a)
72
- // / \endcode
73
- BAOBIS_Always,
74
- // / Force break after the left parenthesis of an if statement only
75
- // / when the expression exceeds the column limit, e.g..:
76
- // / \code
77
- // / if constexpr (
78
- // / a ||
79
- // / b)
80
- // / \endcode
81
- BAOBIS_MultiLine,
82
- // / Do not force a break after the control statement.
83
- // / \code
84
- // / if constexpr (a ||
85
- // / b
86
- // / \endcode
87
- BAOBIS_No,
88
- };
89
-
90
- BreakAfterOpenBracketIfStyle BreakAfterOpenBracketIf;
74
+ bool BreakAfterOpenBracketIf;
91
75
92
- // / Different styles for breaking the parenthesis after loops ``(for/while)``.
76
+ // / Force break after the left parenthesis of a loop control statement
77
+ // / when the expression exceeds the column limit.
78
+ // / \code
79
+ // / true: false:
80
+ // / while ( vs. while (a &&
81
+ // / a && b) {
82
+ // / b) {
83
+ // / \endcode
93
84
// / \version 21
94
- enum BreakAfterOpenBracketLoopStyle : int8_t {
95
- // / Always break the opening parenthesis of a loop statement, e.g.:
96
- // / \code
97
- // / while (
98
- // / a) {
99
- // / \endcode
100
- BAOBLS_Always,
101
- // / Force break after the left parenthesis of a loop only
102
- // / when the expression exceeds the column limit, e.g..:
103
- // / \code
104
- // / while (
105
- // / a &&
106
- // / b) {
107
- // / \endcode
108
- BAOBLS_MultiLine,
109
- // / Do not force a break after the control statement.
110
- // / \code
111
- // / while (a &&
112
- // / b) {
113
- // / \endcode
114
- BAOBLS_No,
115
- };
85
+ bool BreakAfterOpenBracketLoop;
116
86
117
- BreakAfterOpenBracketLoopStyle BreakAfterOpenBracketLoop;
118
-
119
- // / Different styles for breaking the parenthesis after ``switch``.
87
+ // / Force break after the left parenthesis of a switch control statement
88
+ // / when the expression exceeds the column limit.
89
+ // / \code
90
+ // / true: false:
91
+ // / switch ( vs. switch (a &&
92
+ // / a && b) {
93
+ // / b) {
94
+ // / \endcode
120
95
// / \version 21
121
- enum BreakAfterOpenBracketSwitchStyle : int8_t {
122
- // / Always break the opening parenthesis of a switch statement, e.g.:
123
- // / \code
124
- // / switch (
125
- // / a) {
126
- // / \endcode
127
- BAOBSS_Always,
128
- // / Force break after the left parenthesis of a switch only
129
- // / when the expression exceeds the column limit, e.g..:
130
- // / \code
131
- // / switch (
132
- // / a &&
133
- // / b) {
134
- // / \endcode
135
- BAOBSS_MultiLine,
136
- // / Do not force a break after the control statement.
137
- // / \code
138
- // / switch (a &&
139
- // / b) {
140
- // / \endcode
141
- BAOBSS_No,
142
- };
143
-
144
- BreakAfterOpenBracketSwitchStyle BreakAfterOpenBracketSwitch;
96
+ bool BreakAfterOpenBracketSwitch;
145
97
146
98
// / Different styles for aligning after open brackets.
147
99
enum BracketAlignmentStyle : int8_t {
@@ -2296,87 +2248,38 @@ struct FormatStyle {
2296
2248
// / \version 3.7
2297
2249
BraceBreakingStyle BreakBeforeBraces;
2298
2250
2299
- // / Different styles for breaking before ``if/else if`` closing parenthesis.
2251
+ // / Force break before the right parenthesis of an if control statement
2252
+ // / when the expression exceeds the column limit.
2253
+ // / \code
2254
+ // / true: false:
2255
+ // / if constexpr (a || vs. if constexpr (a ||
2256
+ // / b b)
2257
+ // / )
2258
+ // / \endcode
2300
2259
// / \version 21
2301
- enum BreakBeforeCloseBracketIfStyle : int8_t {
2302
- // / Always break the closing parenthesis of an if statement, e.g.:
2303
- // / \code
2304
- // / if constexpr (a
2305
- // / )
2306
- // / \endcode
2307
- BBCBIS_Always,
2308
- // / Force break before the closing parenthesis of an if statement only
2309
- // / when the expression exceeds the column limit, e.g..:
2310
- // / \code
2311
- // / if constexpr (a ||
2312
- // / b
2313
- // / )
2314
- // / \endcode
2315
- BBCBIS_MultiLine,
2316
- // / Do not force a break before closing the if control statement.
2317
- // / \code
2318
- // / if constexpr (a ||
2319
- // / b)
2320
- // / \endcode
2321
- BBCBIS_No,
2322
- };
2323
-
2324
- BreakBeforeCloseBracketIfStyle BreakBeforeCloseBracketIf;
2260
+ bool BreakBeforeCloseBracketIf;
2325
2261
2326
- // / Different styles for breaking before loop ``(for/while)`` closing
2327
- // / parenthesis.
2262
+ // / Force break before the right parenthesis of a loop control statement
2263
+ // / when the expression exceeds the column limit.
2264
+ // / \code
2265
+ // / true: false:
2266
+ // / while (a && vs. while (a &&
2267
+ // / b b) {
2268
+ // / ) {
2269
+ // / \endcode
2328
2270
// / \version 21
2329
- enum BreakBeforeCloseBracketLoopStyle : int8_t {
2330
- // / Always break the closing parenthesis of a loop statement, e.g.:
2331
- // / \code
2332
- // / while (a
2333
- // / ) {
2334
- // / \endcode
2335
- BBCBLS_Always,
2336
- // / Force break before the closing parenthesis of a loop only
2337
- // / when the expression exceeds the column limit, e.g..:
2338
- // / \code
2339
- // / while (a &&
2340
- // / b
2341
- // / ) {
2342
- // / \endcode
2343
- BBCBLS_MultiLine,
2344
- // / Do not force a break before closing the loop control statement.
2345
- // / \code
2346
- // / while (a &&
2347
- // / b) {
2348
- // / \endcode
2349
- BBCBLS_No,
2350
- };
2271
+ bool BreakBeforeCloseBracketLoop;
2351
2272
2352
- BreakBeforeCloseBracketLoopStyle BreakBeforeCloseBracketLoop;
2353
-
2354
- // / Different styles for breaking before ``switch`` closing parenthesis.
2273
+ // / Force break before the right parenthesis of a switch control statement
2274
+ // / when the expression exceeds the column limit.
2275
+ // / \code
2276
+ // / true: false:
2277
+ // / switch (a && vs. switch (a &&
2278
+ // / b b) {
2279
+ // / ) {
2280
+ // / \endcode
2355
2281
// / \version 21
2356
- enum BreakBeforeCloseBracketSwitchStyle : int8_t {
2357
- // / Always break before the closing parenthesis of a switch statement, e.g.:
2358
- // / \code
2359
- // / switch (a
2360
- // / ) {
2361
- // / \endcode
2362
- BBCBSS_Always,
2363
- // / Force break before the closing parenthesis of a switch only
2364
- // / when the expression exceeds the column limit, e.g..:
2365
- // / \code
2366
- // / switch (a &&
2367
- // / b
2368
- // / ) {
2369
- // / \endcode
2370
- BBCBSS_MultiLine,
2371
- // / Do not force a break before closing the switch control statement.
2372
- // / \code
2373
- // / switch (a &&
2374
- // / b) {
2375
- // / \endcode
2376
- BBCBSS_No,
2377
- };
2378
-
2379
- BreakBeforeCloseBracketSwitchStyle BreakBeforeCloseBracketSwitch;
2282
+ bool BreakBeforeCloseBracketSwitch;
2380
2283
2381
2284
// / Different ways to break before concept declarations.
2382
2285
enum BreakBeforeConceptDeclarationsStyle : int8_t {
0 commit comments