[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."
Amy Huang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 12 16:41:01 PDT 2023
akhuang added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:5104
+ if (CallInfo.isDelegateCall()) {
+ NeedCopy = false;
+ } else if (Addr.getAlignment() < Align &&
----------------
rnk wrote:
> 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.
Sorry, didn't mean to include this in the patch.
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