[llvm] [ADT] Refactor Bitset to Be More Constexpr-Usable and Add More Member Functions (PR #172062)

Jiachen Yuan via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 15 18:46:09 PST 2025


================
@@ -67,8 +77,11 @@ class Bitset {
       set(I);
   }
 
-  Bitset &set() {
-    llvm::fill(Bits, -BitWord(0));
----------------
JiachenYuan wrote:

Oh yeah, sorry I misread. This original implementation does seem incorrect. According to [std::bitset](https://en.cppreference.com/w/cpp/utility/bitset/set.html), `set()` without any argument should set all bits to 1.

https://github.com/llvm/llvm-project/pull/172062


More information about the llvm-commits mailing list