Commit 8fefeb8
committed
[clang][ptrauth] reject incorrectly placed ptrauth qualifier
When parsing a function pointer typed field we use
Parser::ParseTypeQualifierListOpt, but then drops subsequent
type attributes and qualifiers unless explicitly handled.
There is an existing solution for the _Atomic qualifier, and
this PR simply extends that to __ptrauth for now. In future
we may want to investigate a more robust mechanism to ensure
type qualifiers are not silently dropped so that future type
qualifiers do not suffer the same problem.1 parent fba68b4 commit 8fefeb8
File tree
4 files changed
+16
-6
lines changed- clang
- include/clang/Parse
- lib/Parse
- test/Sema
4 files changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3253 | 3253 | | |
3254 | 3254 | | |
3255 | 3255 | | |
3256 | | - | |
| 3256 | + | |
3257 | 3257 | | |
3258 | 3258 | | |
3259 | 3259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6511 | 6511 | | |
6512 | 6512 | | |
6513 | 6513 | | |
6514 | | - | |
| 6514 | + | |
6515 | 6515 | | |
6516 | 6516 | | |
6517 | 6517 | | |
| |||
6551 | 6551 | | |
6552 | 6552 | | |
6553 | 6553 | | |
6554 | | - | |
| 6554 | + | |
6555 | 6555 | | |
6556 | 6556 | | |
6557 | 6557 | | |
| |||
6584 | 6584 | | |
6585 | 6585 | | |
6586 | 6586 | | |
| 6587 | + | |
| 6588 | + | |
6587 | 6589 | | |
6588 | 6590 | | |
6589 | 6591 | | |
| |||
6860 | 6862 | | |
6861 | 6863 | | |
6862 | 6864 | | |
6863 | | - | |
| 6865 | + | |
| 6866 | + | |
6864 | 6867 | | |
6865 | 6868 | | |
6866 | 6869 | | |
| |||
7725 | 7728 | | |
7726 | 7729 | | |
7727 | 7730 | | |
7728 | | - | |
| 7731 | + | |
7729 | 7732 | | |
7730 | 7733 | | |
7731 | 7734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2802 | 2802 | | |
2803 | 2803 | | |
2804 | 2804 | | |
2805 | | - | |
| 2805 | + | |
2806 | 2806 | | |
2807 | 2807 | | |
2808 | 2808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments