summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-15 06:45:20 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-15 06:45:20 +0000
commit5590be0491cb6a88146c1580d35dc67b68719c33 (patch)
tree5dbc9b9153276969ba28dacb4961354aa7dc6188 /clang/lib/Serialization/ASTWriter.cpp
parent9c10d587f6fd445becdd0a5fa62af0d8de9adabd (diff)
downloadbcm5719-llvm-5590be0491cb6a88146c1580d35dc67b68719c33.tar.gz
bcm5719-llvm-5590be0491cb6a88146c1580d35dc67b68719c33.zip
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. llvm-svn: 123521
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 4fa48faec52..8a6461fb4f2 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/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;
+ }
}
}
OpenPOWER on IntegriCloud