]> granicus.if.org Git - clang/commit
PR24164, PR39336: init-captures are not distinct full-expressions.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 19 Oct 2018 19:01:34 +0000 (19:01 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 19 Oct 2018 19:01:34 +0000 (19:01 +0000)
commit3c43b80122fc629f0d3bc4b723dbab8a66c9857b
tree9e8a0595b8267936ec8b9a076f1bf1964c293541
parent396dc1658c22d495834ce71a9c975770ed3fca40
PR24164, PR39336: init-captures are not distinct full-expressions.

Rather, they are subexpressions of the enclosing lambda-expression, and
any temporaries in them are destroyed at the end of that
full-expression, or when the corresponding lambda-expression is
destroyed if they are lifetime-extended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344801 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/AST/Expr.cpp
lib/CodeGen/CGExprCXX.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaLambda.cpp
test/CXX/special/class.temporary/p6.cpp
test/CodeGenCXX/cxx1y-init-captures.cpp
test/SemaCXX/cxx1y-init-captures.cpp