[llvm] [ADT] Mark BitVector::find_prev_unset const (NFC) (PR #156272)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 31 20:56:46 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
find_prev_unset calls find_last_unset_in, a const method, but
find_prev_unset itself isn't marked const.
---
Full diff: https://github.com/llvm/llvm-project/pull/156272.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/BitVector.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h
index 70de4c239c1c7..1fbce1a95fb76 100644
--- a/llvm/include/llvm/ADT/BitVector.h
+++ b/llvm/include/llvm/ADT/BitVector.h
@@ -327,7 +327,7 @@ class BitVector {
/// find_prev_unset - Returns the index of the first unset bit that precedes
/// the bit at \p PriorTo. Returns -1 if all previous bits are set.
- int find_prev_unset(unsigned PriorTo) {
+ int find_prev_unset(unsigned PriorTo) const {
return find_last_unset_in(0, PriorTo);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/156272
More information about the llvm-commits
mailing list