[llvm-commits] [patch] More strict checking in LeakDetectorImpl::addGarbage

Nick Lewycky nlewycky at google.com
Fri Dec 18 11:51:45 PST 2009


2009/12/18 Rafael Espindola <espindola at google.com>

> > Could you please write a unit test for this? It took me a while to figure
> > out what was wrong with the original code (even when it was obvious your
> > patch was correct). The case is:
> >   addGarbage(A);
> >   addGarbage(B);
> >   addGarbage(A);  // not caught as already in set...
> >   removeGarbage(A);  // ...unless this were remove(X) where X != A
> > though that would have to be a death test which only works in an asserts
> > build. See unittests/ADT/APIntTest.cpp for an example of a death test in
> > LLVM.
>
> Good idea!
>
> The attached patch includes a test.
>

Looks great, please commit!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091218/d769ab45/attachment.html>


More information about the llvm-commits mailing list