[PATCH] D108123: [MemoryBuiltins] Mark user defined delete as nobuiltin

Bryan Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 06:51:23 PDT 2021


bryanpkc added a comment.

> The C++ standard says all the optimizations we want to do on new/delete expressions are legal whether or not the user replaces the operators . See [expr.new] (http://eel.is/c++draft/expr.new#12) . The weird issues this patch is trying to fix only show up when the definitions are available.

Thanks for linking the standard; I wasn't aware of the legality to optimize calls to such replaced functions. According to that wording, wouldn't we be permitted to omit calls to the overloaded `new`/`delete` operators even when the definitions are available? If we take that stance, there is no problem, is there? Perhaps we should emit an warning that such operator definitions can and will be ignored.


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

https://reviews.llvm.org/D108123



More information about the llvm-commits mailing list