[all-commits] [llvm/llvm-project] deb22f: [ADT] Fix ArrayRef<T>::slice (#113048)
Franklin via All-commits
all-commits at lists.llvm.org
Tue Oct 22 22:16:22 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: deb22fa6613a075fe2c707b2d19001ab9ef28804
https://github.com/llvm/llvm-project/commit/deb22fa6613a075fe2c707b2d19001ab9ef28804
Author: Franklin <zhangfenglei at huawei.com>
Date: 2024-10-22 (Tue, 22 Oct 2024)
Changed paths:
M llvm/include/llvm/ADT/ArrayRef.h
Log Message:
-----------
[ADT] Fix ArrayRef<T>::slice (#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()`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list