Commit deb22fa
authored
[ADT] Fix ArrayRef<T>::slice (llvm#113048)
Current implementation of `slice(N)` is buggy, since
`slice(N, size() - N)` will never fail the assertion
`assert(N+M <= size() && "Invalid specifier")` above, even
`N > size()`.1 parent affb2b7 commit deb22fa
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
0 commit comments