[PATCH] D152231: [CodeGen] Disable default copy ctor and copy assignment operator for class Array
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 00:49:08 PDT 2023
barannikov88 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.
How about making them ' = default' instead?
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