[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
Wed Jun 28 19:21:59 PDT 2017
ahatanak updated this revision to Diff 104579.
ahatanak added a comment.
The updated patch produces diagnostics if an aligned allocation function is selected that is not implemented in the c++ standard library of the deployment target (except when the function is defined by the user and its definition is available).
A couple of points I'd like to address about the approach I took:
- The only way to silence the warning is to use -Wno-aligned-allocation-unavailable, as is mentioned in the note. I initially considered using -faligned-allocation for that purpose, but I realized it would silence errors/warnings when using "-std=c++14 -faligned-allocation", which is not desirable unless the selected aligned functions are defined by the user.
- isReplaceableGlobalAllocationFunction takes a pointer to a bool, but it's also possible to have it return a pair of bools.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 17044 bytes
Desc: not available
More information about the cfe-commits