Fixes:
- find_last/find_last_unset - off-by-one error
- Compound assignment ops and operator== when mixing big/small modes
Paths
| Differential D54933
Fix bugs in SmallBitVector ClosedPublic Authored by bmoody on Nov 26 2018, 11:07 PM.
Details Summary Fixes:
Diff Detail Event TimelineHerald added subscribers: llvm-commits, kristina, dexonsmith. · View Herald TranscriptNov 26 2018, 11:07 PM
Comment Actions Reorganize tests for clarity. Can't see any way to assert that the bit vector is in small mode. bmoody marked an inline comment as done. Comment ActionsProbably should have tried to compile that last change before I uploaded it.. Comment Actions
Since it's important for the test, it might be worth adding one. Comment Actions Is this the same bug described here? https://bugs.llvm.org/show_bug.cgi?id=38996 Can you confirm that it fixes the test cases proposed in that patch? Comment Actions New diff that makes SmallBitVector::isSmall() public and adds asserts to the tests. I don't really agree with this change because I don't think isSmall should be part of SmallBitVector's public interface and I think the test is explicit enough without the asserts. But it's here if you want it. P.s. I don't have commit access, so you're welcome to make any final tweaks and commit on my behalf. This revision is now accepted and ready to land.Nov 29 2018, 11:24 AM Closed by commit rL349173: [ADT] Fix bugs in SmallBitVector. (authored by zturner). · Explain WhyDec 14 2018, 10:24 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 175406 include/llvm/ADT/SmallBitVector.h
unittests/ADT/BitVectorTest.cpp
|
It's not locally obvious why this clear() is important. Is it cleaner to just split into a separate test? Is there also an ASSERT_* you can add to prove that it's in small mode?