Skip to content

Conversation

kazutakahirata
Copy link
Contributor

find_prev_unset calls find_last_unset_in, a const method, but
find_prev_unset itself isn't marked const.

find_prev_unset calls find_last_unset_in, a const method, but
find_prev_unset itself isn't marked const.
@llvmbot
Copy link
Member

llvmbot commented Sep 1, 2025

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

Changes

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 --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);
   }
 

@kazutakahirata kazutakahirata merged commit 0ea54be into llvm:main Sep 1, 2025
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250831_BitVector_find_prev_unset_const branch September 1, 2025 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants