Commit c6b6285
committed
[clang-format] Reorder TokenAnnotator::canBreakBefore
Move the checks related to breaking before right braces and right parens
earlier to avoid conflicting checks that prevent breaking based on the
left-hand token. This allows properly formatting declarations with
pointers and references.1 parent 516d6ed commit c6b6285
File tree
2 files changed
+43
-28
lines changed- clang
- lib/Format
- unittests/Format
2 files changed
+43
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6105 | 6105 | | |
6106 | 6106 | | |
6107 | 6107 | | |
| 6108 | + | |
| 6109 | + | |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
| 6113 | + | |
| 6114 | + | |
| 6115 | + | |
| 6116 | + | |
| 6117 | + | |
| 6118 | + | |
| 6119 | + | |
| 6120 | + | |
| 6121 | + | |
| 6122 | + | |
| 6123 | + | |
| 6124 | + | |
| 6125 | + | |
| 6126 | + | |
| 6127 | + | |
| 6128 | + | |
| 6129 | + | |
| 6130 | + | |
| 6131 | + | |
| 6132 | + | |
| 6133 | + | |
| 6134 | + | |
6108 | 6135 | | |
6109 | 6136 | | |
6110 | 6137 | | |
| |||
6260 | 6287 | | |
6261 | 6288 | | |
6262 | 6289 | | |
6263 | | - | |
6264 | | - | |
6265 | | - | |
6266 | | - | |
6267 | | - | |
6268 | | - | |
6269 | | - | |
6270 | | - | |
6271 | | - | |
6272 | | - | |
6273 | | - | |
6274 | | - | |
6275 | | - | |
6276 | | - | |
6277 | | - | |
6278 | | - | |
6279 | | - | |
6280 | | - | |
6281 | | - | |
6282 | | - | |
6283 | | - | |
6284 | | - | |
6285 | | - | |
6286 | | - | |
6287 | | - | |
6288 | | - | |
6289 | | - | |
6290 | | - | |
6291 | 6290 | | |
6292 | 6291 | | |
6293 | 6292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9383 | 9383 | | |
9384 | 9384 | | |
9385 | 9385 | | |
| 9386 | + | |
| 9387 | + | |
| 9388 | + | |
| 9389 | + | |
| 9390 | + | |
| 9391 | + | |
| 9392 | + | |
9386 | 9393 | | |
9387 | 9394 | | |
9388 | 9395 | | |
| |||
9441 | 9448 | | |
9442 | 9449 | | |
9443 | 9450 | | |
| 9451 | + | |
| 9452 | + | |
| 9453 | + | |
| 9454 | + | |
| 9455 | + | |
| 9456 | + | |
| 9457 | + | |
| 9458 | + | |
| 9459 | + | |
9444 | 9460 | | |
9445 | 9461 | | |
9446 | 9462 | | |
| |||
0 commit comments