Commit 3b150fb
authored
[clang][bytecode] Handle negative array sizes in constexpr
This patch fixes a crash in the constexpr interpreter when evaluating
`new T[n]` with a negative element count.
Fixes llvm#152904new instead of asserting (llvm#155737)1 parent 868e596 commit 3b150fb
File tree
2 files changed
+31
-1
lines changed- clang
- lib/AST/ByteCode
- test/AST/ByteCode
2 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3490 | 3490 | | |
3491 | 3491 | | |
3492 | 3492 | | |
3493 | | - | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
3494 | 3502 | | |
3495 | 3503 | | |
3496 | 3504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1072 | 1094 | | |
1073 | 1095 | | |
1074 | 1096 | | |
| |||
0 commit comments