Commit a156fed
authored
Fix crash in CanConvert from incomplete type (#8110)
A crash could be triggered in IsHLSLCopyableAnnotatableRecord when
checking whether an explicit cast would be allowed for diagnostics, when
adding function overload candidates with an incomplete target param
type, and the source type is a basic type that supports splat to record
type.
Fixed by attempting to complete the type in CanConvert before calling
IsHLSLNumericOrAggregateOfNumericType (which calls
IsHLSLCopyableAnnotatableRecord). If it fails to complete, it will
harmlessly skip this case.1 parent 317e2f1 commit a156fed
File tree
2 files changed
+40
-0
lines changed- tools/clang
- lib/Sema
- test/CodeGenDXIL/templates
2 files changed
+40
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10133 | 10133 | | |
10134 | 10134 | | |
10135 | 10135 | | |
| 10136 | + | |
10136 | 10137 | | |
10137 | 10138 | | |
10138 | 10139 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments