Commit 22e4fa0
committed
Move const qualification of array to its elements
Const-qualification of an array caused by constexpr specifier can
produce QualType, where the const qualifier is set both as fast
qualifier and as a qualifier of the array element type. It can result in
a compiler crash, because such QualType does not compare equal to the
same type but without extra qualification.
As a fix, the const qualifier is moved to the array element type when
setting the implicit const.
It fixes #97005 (Clang
crashed in ASTContext::getCommonSugaredType).1 parent 3f62718 commit 22e4fa0
File tree
4 files changed
+16
-3
lines changed- clang
- lib/Sema
- test
- AST/ByteCode
- SemaCXX
- Sema
4 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5613 | 5613 | | |
5614 | 5614 | | |
5615 | 5615 | | |
5616 | | - | |
| 5616 | + | |
5617 | 5617 | | |
| 5618 | + | |
| 5619 | + | |
| 5620 | + | |
| 5621 | + | |
| 5622 | + | |
5618 | 5623 | | |
5619 | 5624 | | |
5620 | 5625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments