]> granicus.if.org Git - clang/commit
PR42104: Support instantiations of lambdas that implicitly capture
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 3 Jun 2019 06:02:10 +0000 (06:02 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 3 Jun 2019 06:02:10 +0000 (06:02 +0000)
commit612390c43e74e99525c5d7c7b1fa080ec43aece2
tree54073366b5a4c5258aabc8c55dcf74418e880056
parent3932cbe66b32a3d4d4e7d3d0ed92435ded8290d0
PR42104: Support instantiations of lambdas that implicitly capture
packs.

Two changes:
 * Track odr-use via FunctionParmPackExprs to properly handle dependent
   odr-uses of packs in generic lambdas.
 * Do not instantiate implicit captures; instead, regenerate them by
   instantiating the body of the lambda. This is necessary to
   distinguish between cases where only one element of a pack is
   captured and cases where the entire pack is captured.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362358 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/ScopeInfo.h
include/clang/Sema/Sema.h
lib/Sema/ScopeInfo.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/TreeTransform.h
test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp
test/SemaTemplate/lambda-capture-pack.cpp [new file with mode: 0644]