[PATCH] D152231: [CodeGen] Disable default copy ctor and copy assignment operator for class Array
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 10:58:41 PDT 2023
dblaikie added a comment.
In D152231#4427054 <https://reviews.llvm.org/D152231#4427054>, @pengfei wrote:
> I think the intention here is to harden the code to avoid potential risks, e.g., UAF, caused by shallow copy.
> I don't see a problem to have a strict rule for this. According to LLVM policy, downstream only usage is not a strong reason for upstream code. And I think it's also good to define an explicit copy constructor if you are intended to do the copy.
But there was no problem with this code and its copy ctor/assignment operator to begin with? Perhaps just renaming this or reusing the exsiting `llvm::MutableArrayRef` here?
& I'm still not sure about the rest of the related changes that were made to other types in this series of patches - I'd like a broader design discussion about the set of changes, probably on discourse.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152231/new/
https://reviews.llvm.org/D152231
More information about the llvm-commits
mailing list