Commit cdf9f1a
committed
[clang] Fix array types comparison in getCommonSugaredType
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.
To avoid the crash, the redundant qualifiers are removed while searching
for common sugar.
It fixes #97005 (Clang
crashed in ASTContext::getCommonSugaredType).1 parent 3f62718 commit cdf9f1a
File tree
2 files changed
+19
-0
lines changed- clang
- lib/AST
- test/SemaCXX
2 files changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14171 | 14171 | | |
14172 | 14172 | | |
14173 | 14173 | | |
| 14174 | + | |
| 14175 | + | |
| 14176 | + | |
| 14177 | + | |
| 14178 | + | |
| 14179 | + | |
| 14180 | + | |
| 14181 | + | |
| 14182 | + | |
14174 | 14183 | | |
14175 | 14184 | | |
14176 | 14185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments