[c++20] P0780R2: Support pack-expansion of init-captures.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 May 2019 20:10:50 +0000 (20:10 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 21 May 2019 20:10:50 +0000 (20:10 +0000)
commitb2997f579a8b6552a49eab97e33c437b9251eb0a
tree73c1636810d5a9a7b8d5e9af36cd2c6ab0182eac
parent6e19543a2a2013bd357eb15e383b435cd0cbb810
[c++20] P0780R2: Support pack-expansion of init-captures.

This permits an init-capture to introduce a new pack:

  template<typename ...T> 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
31 files changed:
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/Decl.h
clang/include/clang/AST/ExprCXX.h
clang/include/clang/AST/Type.h
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/include/clang/Sema/Template.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Decl.cpp
clang/lib/AST/DeclBase.cpp
clang/lib/AST/ExprCXX.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/JSONNodeDumper.cpp
clang/lib/AST/TextNodeDumper.cpp
clang/lib/AST/Type.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Sema/SemaLambda.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/lib/Sema/SemaTemplateVariadic.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p17.cpp [new file with mode: 0644]
clang/test/CXX/expr/expr.prim/expr.prim.lambda/p23.cpp
clang/test/CXX/temp/temp.decls/temp.variadic/init-capture.cpp [new file with mode: 0644]
clang/test/FixIt/fixit-c++2a.cpp [new file with mode: 0644]
clang/test/SemaTemplate/sizeof-pack.cpp
clang/www/cxx_status.html