[cfe-commits] [PATCH] No longer crash with invalid deleted and defaulted functions

Aaron Ballman aaron at aaronballman.com
Tue Jan 15 15:39:33 PST 2013


We could, but it would mean updating seven places instead of just two.

~Aaron

On Tue, Jan 15, 2013 at 6:30 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> Looks fine. It's a bit nasty that we see null pointers here in the
> first place, though; have you checked whether the callers could easily
> be taught to not call these functions with null pointers?
>
> On Tue, Jan 15, 2013 at 1:24 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>> This patch addresses PR14577; basically, if you have an invalid
>> function declaration (comes back null), then attempt to set it to
>> default or delete, we would crash because of dyn_cast usage.  The
>> patch switches the code over to dyn_cast_or_null and adds a few test
>> cases.
>>
>> ~Aaron
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>



More information about the cfe-commits mailing list