]> granicus.if.org Git - clang/commit
[MS] Fix late-parsed template infinite loop in eager instantiation
authorReid Kleckner <rnk@google.com>
Mon, 26 Mar 2018 18:22:47 +0000 (18:22 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 26 Mar 2018 18:22:47 +0000 (18:22 +0000)
commita307b9d3d811ee979653936eebad3e86df84055a
treee70b7ab89ed03c5b993b204c03089eab33ffa258
parentb30363739849ed4f28dfc07ace9f38e124c13f9a
[MS] Fix late-parsed template infinite loop in eager instantiation

Summary:
This fixes PR33561 and PR34185.

Don't store pending template instantiations for late-parsed templates in
the normal PendingInstantiations queue. Instead, use a separate list
that will only be parsed and instantiated at end of TU when late
template parsing actually works and doesn't infinite loop.

Reviewers: rsmith, thakis, hans

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D44846

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328567 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/Sema.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/PCH/late-parsed-instantiations.cpp [new file with mode: 0644]
test/SemaTemplate/late-parsing-eager-instantiation.cpp [new file with mode: 0644]