summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix cleanup registration for lambda captures.Richard Smith2019-01-171-0/+104
Lambda captures should be destroyed if an exception is thrown only if the construction of the complete lambda-expression has not completed. (If the lambda-expression has been fully constructed, any exception will invoke its destructor, which will destroy the captures.) This is directly modeled after how we handle the equivalent situation in InitListExprs. Note that EmitLambdaLValue was unreachable because in C++11 onwards the frontend never creates the awkward situation where a prvalue expression (such as a lambda) is used in an lvalue context (such as the left-hand side of a class member access). llvm-svn: 351487
OpenPOWER on IntegriCloud