r208481 - Don't leak default arg tokens on invalid destructors or conversion functions.

Richard Smith richard at metafoo.co.uk
Sat May 10 18:12:11 PDT 2014


Looks great, thanks!
On 10 May 2014 17:36, "Nico Weber" <thakis at chromium.org> wrote:

> >> >      void freeParams() {
>> >> > +      if (Params) {
>> >> > +        delete Params->DefaultArgTokens;
>> >> > +        Params->DefaultArgTokens = nullptr;
>> >>
>> >> Doesn't Params point to an array? Looks like this will still leak the
>> second and subsequent default arguments.
>> >
>> > I believe it points to a CachedTokens, which is a typedef for
>> a SmallVector<Token, 4> – so I think it might be correct as-is?
>>
>> You're only deleting the tokens for the first parameter
>>
> You're right, of course. How does r208484 look?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140510/8f754a05/attachment.html>


More information about the cfe-commits mailing list