[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 12 16:23:18 PDT 2023
rnk added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:5104
+ if (CallInfo.isDelegateCall()) {
+ NeedCopy = false;
+ } else if (Addr.getAlignment() < Align &&
----------------
Please add a comment about this. We need to avoid copying uncopyable objects passed in misaligned inalloca argument packs.
Another approach we could take here is to check `CXXRecordDecl::isTriviallyCopyable`, and avoid doing the copy for such argument types. That would be non-conforming anyway, and results in an assert in `CallArg::copyInto`. For trivially copyable types, doing the copy may actually be good, since it's more conforming.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154007/new/
https://reviews.llvm.org/D154007
More information about the cfe-commits
mailing list