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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 26 14:12:50 PDT 2017


rsmith added a comment.

In https://reviews.llvm.org/D34574#791157, @dexonsmith wrote:

> Likely, something like `-Werror=aligned-allocation-availability` (by default).


An error by default seems OK if accompanied with a "use -faligned-allocation if you supply your own aligned allocation functions" hint.

> I also wonder: should we add a warning for such code in pre-C++17?

`-Wover-aligned` catches this for pre-C++17. We should probably enable it by default, though :)


https://reviews.llvm.org/D34574





More information about the cfe-commits mailing list