Another approach is to do the opposite: use PossbilyNull<T> for particular pointers that folks commonly forget to null check. The Document pointer in Nodes and the Frame pointer in Documents come to mind...
Adam On Wed, Jul 29, 2009 at 12:40 AM, Pierre d'Herbemont<pdherbem...@gmail.com> wrote: > > On Jul 28, 2009, at 3:25 PM, Eric Seidel wrote: > > void doSomething(Foo* foo) > { > ASSERT(foo); > } > > As a side note, gcc should support nonnull attribute even for C++. That's a > way to get some static analysis for free. > > void doSomething(Foo* foo) __attribute__((nonnull)); > Pierre. > [1] http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html > > > _______________________________________________ > webkit-dev mailing list > webkit-dev@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev