[PATCH] D123085: CGExprCXX: emit allocptr attributes for operator delete

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 13 15:41:56 PDT 2023


jyknight added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprCXX.cpp:1333
+        CalleeDecl->getOverloadedOperator() == OO_Delete) {
+      CallOrInvoke->addParamAttr(0, llvm::Attribute::AllocatedPointer);
+    }
----------------
Perhaps we should add this attribute to the fn decl and all calls? I think that unlike "alloc-family" in the future patch, this attribute probably doesn't need to be only applied to these "builtin" uses?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123085/new/

https://reviews.llvm.org/D123085



More information about the cfe-commits mailing list