>
> >> >      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?
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to