From b2997f579a8b6552a49eab97e33c437b9251eb0a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 21 May 2019 20:10:50 +0000 Subject: [c++20] P0780R2: Support pack-expansion of init-captures. This permits an init-capture to introduce a new pack: template auto x = [...a = T()] { /* a is a pack */ }; To support this, the mechanism for allowing ParmVarDecls to be packs has been extended to support arbitrary local VarDecls. llvm-svn: 361300 --- clang/lib/Serialization/ASTWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Serialization/ASTWriter.cpp') diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index a0eb2f3b3eb..a6950e490fc 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -369,7 +369,8 @@ void ASTTypeWriter::VisitAutoType(const AutoType *T) { Record.AddTypeRef(T->getDeducedType()); Record.push_back((unsigned)T->getKeyword()); if (T->getDeducedType().isNull()) - Record.push_back(T->isDependentType()); + Record.push_back(T->containsUnexpandedParameterPack() ? 2 : + T->isDependentType() ? 1 : 0); Code = TYPE_AUTO; } -- cgit v1.2.3