Commit 2aa67b3
[clang-format] Restrict the special handling for K&R C to C/C++
Commits 58494c8, f6bc614, and 0fc27ef added special
handlings for K&R C function definitions and caused some
JavaScript/TypeScript regressions which were addressed in D107267,
D108538, and D108620. This patch would have prevented these known
regressions and will fix any unknown ones.
Differential Revision: https://reviews.llvm.org/D109582
(cherry picked from commit 3205dd3)1 parent f1342c7 commit 2aa67b3
File tree
2 files changed
+17
-4
lines changed- clang
- lib/Format
- unittests/Format
2 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2398 | 2398 | | |
2399 | 2399 | | |
2400 | 2400 | | |
2401 | | - | |
| 2401 | + | |
2402 | 2402 | | |
2403 | 2403 | | |
2404 | 2404 | | |
| |||
2476 | 2476 | | |
2477 | 2477 | | |
2478 | 2478 | | |
2479 | | - | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
2480 | 2482 | | |
2481 | 2483 | | |
2482 | 2484 | | |
2483 | 2485 | | |
2484 | | - | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
2485 | 2491 | | |
2486 | 2492 | | |
| 2493 | + | |
2487 | 2494 | | |
2488 | 2495 | | |
2489 | 2496 | | |
| |||
2544 | 2551 | | |
2545 | 2552 | | |
2546 | 2553 | | |
2547 | | - | |
| 2554 | + | |
2548 | 2555 | | |
2549 | 2556 | | |
2550 | 2557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8253 | 8253 | | |
8254 | 8254 | | |
8255 | 8255 | | |
| 8256 | + | |
| 8257 | + | |
| 8258 | + | |
| 8259 | + | |
| 8260 | + | |
| 8261 | + | |
8256 | 8262 | | |
8257 | 8263 | | |
8258 | 8264 | | |
| |||
0 commit comments