Commit 8e16e5c
authored
[HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (#127670)
Fixes this crash: https://hlsl.godbolt.org/z/9aP74s4bP
Which happens because the de-sugared type is the same as the
canonicalized type.
Check if the de-sugared type is canonical before getting the
ArrayParameterType of the canonical type.
Add AST test to ensure crash doesn't happen.1 parent 4efab09 commit 8e16e5c
File tree
2 files changed
+14
-2
lines changed- clang
- lib/AST
- test/AST/HLSL
2 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3898 | 3898 | | |
3899 | 3899 | | |
3900 | 3900 | | |
3901 | | - | |
| 3901 | + | |
| 3902 | + | |
3902 | 3903 | | |
3903 | 3904 | | |
3904 | 3905 | | |
| |||
3910 | 3911 | | |
3911 | 3912 | | |
3912 | 3913 | | |
3913 | | - | |
| 3914 | + | |
3914 | 3915 | | |
3915 | 3916 | | |
3916 | 3917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments