[PATCH] D152231: [CodeGen] Disable default copy ctor and copy assignment operator for class Array

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 23:20:56 PDT 2023


pengfei added a comment.

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.


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