Commit 5cdefb4
[clang-format] Don't move qualifiers past pointers-to-member
Previously, given a pointer-to-member type such as `Foo const Bar::*`,
clang-format would see the `const Bar::` part as a regular type name
with scope resolution operators, and with `QualifierAlignment: Right` it
would attempt to "fix" it, resulting in `Foo Bar::const *`, a syntax
error.
This patch no longer allows qualifiers to be moved across `::*`.
Fixes llvm#60898
Reviewed By: owenpan, MyDeveloperDay, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D144537
(cherry picked from commit 393e197)1 parent 076ceb7 commit 5cdefb4
File tree
2 files changed
+24
-1
lines changed- clang
- lib/Format
- unittests/Format
2 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
284 | 286 | | |
| 287 | + | |
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
423 | 433 | | |
424 | 434 | | |
425 | 435 | | |
| |||
565 | 575 | | |
566 | 576 | | |
567 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
568 | 588 | | |
569 | 589 | | |
570 | 590 | | |
| |||
0 commit comments