[PATCH] D50205: [libc++] Add availability markup for aligned new/delete

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 6 07:28:36 PDT 2018


ldionne added a comment.

In https://reviews.llvm.org/D50205#1188454, @EricWF wrote:

> How does this work when a user provides their own definitions? Does the attribute from the declaration still produce a warning? If so, then I think an in-compiler approach is better.


Yes. I do agree that not warning when the user provides their own definition is a better user experience, however I think that is already the behavior we have for sized new/delete (with `_LIBCPP_AVAILABILITY_SIZED_NEW_DELETE`). Is it any different?

If we were to go for an in-compiler approach, what would be the behavior we want? Any TU that uses the operator but defines it would not get a warning, but any TU that uses it without defining it would still get a warning, right? If so, it doesn't seem like such a huge improvement.


Repository:
  rCXX libc++

https://reviews.llvm.org/D50205





More information about the cfe-commits mailing list