[llvm] r216044 - Fix an off by 1 bug that prevented SmallPtrSet from using all of its 'small' capacity. Then fix the early return in the move constructor that prevented 'small' moves from clearing the NumElements in the moved from object. The directed test missed this because it was always testing large moves due to the off by 1 bug.

Craig Topper craig.topper at gmail.com
Tue Aug 19 22:19:57 PDT 2014


Not sure how. How do can we verify if its still 'small' or not from
outside? With the off by 1 fixed, the test did catch the bad move
constructor.


On Tue, Aug 19, 2014 at 10:13 PM, Chandler Carruth <chandlerc at google.com>
wrote:

>
> On Tue, Aug 19, 2014 at 9:41 PM, Craig Topper <craig.topper at gmail.com>
> wrote:
>
>> The directed test missed this because it was always testing large moves
>> due to the off by 1 bug.
>
>
> Add a test for the off-by-one small state?
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140819/55382aca/attachment.html>


More information about the llvm-commits mailing list