hfinkel added a comment.

In http://reviews.llvm.org/D17993#371459, @chandlerc wrote:

> In http://reviews.llvm.org/D17993#371454, @hfinkel wrote:
>
> > In http://reviews.llvm.org/D17993#370793, @chandlerc wrote:
> >
> > > If we're not going to fully implement "fdelete-null-pointer-checks" we 
> > > shouldn't claim to... I'm really worried about us accepting that flag and 
> > > not actually honoring it.
> > >
> > > However, I *do* think this should be guarded by a flag, and it should be 
> > > specific to the 'this' pointer. And I'm also sufficiently terrified of 
> > > this that I think the flag should be off to start with so that folks can 
> > > find out how bad this is really going to be...
> >
> >
> > I agree with you, but I don't really understand why this particular use of 
> > nonnull is scary. Do you really think we have people calling member 
> > functions on null pointers on purpose and checking for a null this pointer 
> > in their code?
>
>
> Yes, we saw an astonishing number of instances of this when turning on the 
> warning.
>
> I don't have any real sympathy for the pattern or principle of the code -- it 
> is *really* bad. But at the same time, I do have sympathy for the users of 
> Clang who often inherited that code and would have to make substantial plans 
> to fix all of it before this kind of thing could be rolled out.


Interesting.  Then, indeed, we at least need a flag. Not sure we need nonnull 
this disabled by default, however.


http://reviews.llvm.org/D17993



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to