[PATCH] D152231: [CodeGen] Disable default copy ctor and copy assignment operator for class Array
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 00:02:26 PDT 2023
skan added a comment.
In D152231#4427275 <https://reviews.llvm.org/D152231#4427275>, @barannikov88 wrote:
> 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?
I have the same suggestion
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