diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-10-15 17:08:33 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-10-15 17:08:33 +0000 |
commit | 065a98c4ce5af0110844dd6a43659cfda618e990 (patch) | |
tree | 0f111608d6f726a3fd51712d77b210d4f83c5005 /lib/Sema/Sema.cpp | |
parent | 763069ac81d376e544b40a844a70e5e984e10bf4 (diff) |
Fix late template parsing leak with incremental processing
Add a second late template parser callback meant to cleanup any
resources allocated by late template parsing. Call it from the
Sema::ActOnEndOfTranslationUnit method after all pending template
instantiations have been completed. Teach Parser::ParseTopLevelDecl to
install the cleanup callback when incremental processing is enabled so
that Parser::TemplateIds can be freed.
Patch by Brad King!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index aae2008957..70e4eaab8e 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -672,6 +672,9 @@ void Sema::ActOnEndOfTranslationUnit() { } PerformPendingInstantiations(); + if (LateTemplateParserCleanup) + LateTemplateParserCleanup(OpaqueParser); + CheckDelayedMemberExceptionSpecs(); } |