Commit 513b10d
authored
[clang-format] Fix formatting of
`UnwrappedLineParser::parseBracedList` had no
explicit handling for the `requires` keyword, so it would just call
`nextToken()` instead of properly parsing the `requires` expression.
This fix adds a case for `tok::kw_requires` in `parseBracedList`,
calling `parseRequiresExpression` to handle it correctly, matching the
existing behavior in `parseParens`.
Fixes #162984.requires expressions in braced initializers (#163005)1 parent 92f1af3 commit 513b10d
File tree
2 files changed
+11
-0
lines changed- clang
- lib/Format
- unittests/Format
2 files changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2569 | 2569 | | |
2570 | 2570 | | |
2571 | 2571 | | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
2572 | 2578 | | |
2573 | 2579 | | |
2574 | 2580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1490 | 1490 | | |
1491 | 1491 | | |
1492 | 1492 | | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
1493 | 1498 | | |
1494 | 1499 | | |
1495 | 1500 | | |
| |||
0 commit comments