[PATCH] [analyzer] Assume new returns non-null even under -fno-exceptions

Arthur O'Dwyer arthur.j.odwyer at gmail.com
Tue Aug 27 11:22:09 PDT 2013


On Tue, Aug 27, 2013 at 9:16 AM, Jordan Rose <jordan_rose at apple.com> wrote:
> On Aug 27, 2013, at 9:03 , Arthur O'Dwyer <arthur.j.odwyer at gmail.com> wrote:
>>
>> I like this patch, but I think it makes it even more important that
>> Clang implement GCC's -fcheck-new semantics as soon as possible.
>
> [...] I think it's okay for this to go in unrelated to -fcheck-new

Oh, definitely the patch should go in. I said I liked it. :)

I'm just saying, Pavel is replacing "if !-fno-exceptions" with "if
true", when the ideally correct logic would be "if !-fcheck-new"
except that Clang hasn't implemented that flag yet. You're replacing
one approximation with another, rather than dealing with the
underlying missing functionality. (At least, that's one way of looking
at it. There are others. ;))

–Arthur




More information about the cfe-commits mailing list