]> granicus.if.org Git - clang/commit
Reland r219810 "Fix late template parsing leak with incremental processing"
authorReid Kleckner <reid@kleckner.net>
Wed, 22 Oct 2014 17:50:19 +0000 (17:50 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 22 Oct 2014 17:50:19 +0000 (17:50 +0000)
commite1f5149843bc2e307537c95dc23e84b564ca0be6
tree12887d6995f549935eaf7c57de0fc18a1364d189
parentb7f05872636b6eaf6f0b11b177b812dee891c19f
Reland r219810 "Fix late template parsing leak with incremental processing"

Original message:
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@220400 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
lib/Parse/Parser.cpp
lib/Sema/Sema.cpp
unittests/Frontend/FrontendActionTest.cpp