[PATCH] D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 26 13:53:09 PDT 2017


ahatanak added a comment.

Duncan and I had a discussion on this.

We are thinking about adding a warning that tells users that aligned allocation /deallocation operators are being called but they are not defined in the library. If the users haven't defined their own aligned allocation / deallocation operators, they will get a link error if the deployment target is too old, but the warning will tell them what the root cause of the error is. If they have defined their own operators, they will get a false positive warning, but it's still possible to turn it off by passing -faligned-allocation. Annotating the implicit declarations with availability will cause compile time errors, so we can't do so if we just want to issue a warning.

Richard, what do you think?


https://reviews.llvm.org/D34574





More information about the cfe-commits mailing list