This is an archive of the discontinued LLVM Phabricator instance.

[libc++abi] Remove redundant null pointer check in operator delete
ClosedPublic

Authored by MaskRay on Dec 15 2020, 1:39 PM.

Details

Summary

Similar to D52401. Normally operator delete is defined in libc++abi
(LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS is off by default).

C89 4.10.3.2 The free function
C99 7.20.3.2 The free function
C11 7.22.3.3 The free function

If ptr is a null pointer, no action shall occur.

free on MSDN:

If memblock is NULL, the pointer is ignored and free immediately returns.

Diff Detail

Event Timeline

MaskRay requested review of this revision.Dec 15 2020, 1:39 PM
MaskRay created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2020, 1:39 PM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
ldionne accepted this revision.Dec 16 2020, 1:18 PM
This revision is now accepted and ready to land.Dec 16 2020, 1:18 PM
This revision was landed with ongoing or failed builds.Dec 16 2020, 1:29 PM
This revision was automatically updated to reflect the committed changes.