find_next_unset was returning size() instead of -1 in small-mode, when no unset bits are found.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/ADT/SmallBitVector.h | ||
---|---|---|
296 | Wouldn't it be simpler to leave ++Prev from line 290 in place and then just use Prev ? |
Comment Actions
Great! Please commit this on my behalf, as I don't have commit access. Thanks.
llvm/include/llvm/ADT/SmallBitVector.h | ||
---|---|---|
296 | IMO modifying parameter values can make code more confusing at a glance, so I try to avoid it. But the main reason I did this was to make the code as close to the find_next implementation above as possible. |
Wouldn't it be simpler to leave ++Prev from line 290 in place and then just use Prev ?