[PATCH/RFC] Fix -fdelayed-template-parsing leaks with enableIncrementalProcessing

Reid Kleckner rnk at google.com
Tue Sep 2 14:21:00 PDT 2014


+Ben Kramer, since he wrote r154743.

It seems reasonable for Sema to ask Parser to clean things up at the end of
ActOnEndOfTranslationUnit. In this particular edge case we don't have a
Parser call bracketing the Sema methods, so we have to resort to something
more explicit.


On Tue, Sep 2, 2014 at 12:04 PM, Brad King <brad.king at kitware.com> wrote:

> On 08/19/2014 03:43 PM, Brad King wrote:
> > With -fdelayed-template-parsing enabled (for MSVC compat) then late
> > template parsing allocates TemplateIdAnnotation instances that are
> > never freed.
> [snip]
> > Here is a patch series to add a test for this case and propose a
> > possible fix.
>
> Ping.  My application cannot run in Assert builds without this, and
> I think avoiding memory leaks is good for Clang upstream anyway.
>
> Thanks,
> -Brad
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140902/0658cb64/attachment.html>


More information about the cfe-commits mailing list