[PATCH] D51200: Introduce per-callsite inline intrinsics

Jakub Kuderski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 4 13:33:59 PDT 2018


kuhar added a comment.

Thank you for the comments, Richard!

In https://reviews.llvm.org/D51200#1223745, @rsmith wrote:

> Have you considered whether the builtin should apply to `new` expressions? (There are potentially three different top-level calls implied by a `new` expression -- an `operator new`, a constructor, and an `operator delete` -- so it's not completely obvious what effect this would have there.) And likewise for `delete`.


I haven't thought about it, but to be honest I'm not sure what should happen. Intuitively, I think these 3 options would make most sense, listed from the most to the least reasonable in my opionion:

  1. apply the corresponding attribute to all of the implied calls
  2. apply to constructor/destructor only
1. don't handle it at all -- emit an error

How would you suggest to handle it?


https://reviews.llvm.org/D51200





More information about the cfe-commits mailing list