]> granicus.if.org Git - clang/commit
[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)
commit2cbdb2c8c9b3f69f86778901a4bfbc5a7fb11c79
treea9638e027a838edc2442221abe6d38be1e685828
parent830db7a928404a1f6365312d1045400af3d198b3
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361300 91177308-0d34-0410-b5e6-96231b3b80d8
31 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/Decl.h
include/clang/AST/ExprCXX.h
include/clang/AST/Type.h
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
include/clang/Sema/Template.h
lib/AST/ASTContext.cpp
lib/AST/Decl.cpp
lib/AST/DeclBase.cpp
lib/AST/ExprCXX.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/JSONNodeDumper.cpp
lib/AST/TextNodeDumper.cpp
lib/AST/Type.cpp
lib/Parse/ParseExprCXX.cpp
lib/Sema/SemaLambda.cpp
lib/Sema/SemaTemplateDeduction.cpp
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/SemaTemplateVariadic.cpp
lib/Sema/TreeTransform.h
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriter.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p17.cpp [new file with mode: 0644]
test/CXX/expr/expr.prim/expr.prim.lambda/p23.cpp
test/CXX/temp/temp.decls/temp.variadic/init-capture.cpp [new file with mode: 0644]
test/FixIt/fixit-c++2a.cpp [new file with mode: 0644]
test/SemaTemplate/sizeof-pack.cpp
www/cxx_status.html