summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/lambda-to-function-pointer-conversion.cpp
AgeCommit message (Collapse)Author
2022-08-23[clang] Create alloca to pass into static lambdaVitaly Buka
"this" parameter of lambda if undef, notnull and differentiable. So we need to pass something consistent. Any alloca will work. It will be eliminated as unused later by optimizer. Otherwise we generate code which Msan is expected to catch. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D132275
2018-04-27[CodeGen] Avoid destructing a callee-destructued struct type in aAkira Hatanaka
function if a function delegates to another function. Fix a bug introduced in r328731, which caused a struct with ObjC __weak fields that was passed to a function to be destructed twice, once in the callee function and once in another function the callee function delegates to. To prevent this, keep track of the callee-destructed structs passed to a function and disable their cleanups at the point of the call to the delegated function. This reapplies r331016, which was reverted in r331019 because it caused an assertion to fail in EmitDelegateCallArg on a windows bot. I made changes to EmitDelegateCallArg so that it doesn't try to deactivate cleanups for structs that have trivial destructors (cleanups for those structs are never pushed to the cleanup stack in EmitParmDecl). rdar://problem/39194693 Differential Revision: https://reviews.llvm.org/D45382 llvm-svn: 331020