diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-15 06:45:20 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-15 06:45:20 +0000 |
commit | 1aee05d08b2184acadeb36de300e216390780d6c (patch) | |
tree | a995851490cb0ea0b3e3c15fa55cf50606c68500 /lib/Serialization/ASTWriter.cpp | |
parent | 610068c8cd2321f90e147b12cf794e1f840b6405 (diff) |
Introduce a new kind of TemplateName that captures a substituted
template template parameter pack that cannot be fully expanded because
its enclosing pack expansion could not be expanded. This form of
TemplateName plays the same role as SubstTemplateTypeParmPackType and
SubstNonTypeTemplateParmPackExpr do for template type parameter packs
and non-type template parameter packs, respectively.
We should now handle these multi-level pack expansion substitutions
anywhere. The largest remaining gap in our variadic-templates support
is that we cannot cope with non-type template parameter packs whose
type is a pack expansion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 4fa48faec5..8a6461fb4f 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -3214,6 +3214,14 @@ void ASTWriter::AddTemplateName(TemplateName Name, RecordDataImpl &Record) { Record.push_back(DepT->getOperator()); break; } + + case TemplateName::SubstTemplateTemplateParmPack: { + SubstTemplateTemplateParmPackStorage *SubstPack + = Name.getAsSubstTemplateTemplateParmPack(); + AddDeclRef(SubstPack->getParameterPack(), Record); + AddTemplateArgument(SubstPack->getArgumentPack(), Record); + break; + } } } |