Remove redundant null pointer check in operator delete
authorFangrui Song <maskray@google.com>
Tue, 25 Sep 2018 02:50:57 +0000 (02:50 +0000)
committerFangrui Song <maskray@google.com>
Tue, 25 Sep 2018 02:50:57 +0000 (02:50 +0000)
commit6da5366ea9f92c1318a8b360062668c8e25a08e8
tree8180773786cc563b83b9736acd5f68fd9316c3c4
parent14fefe7f8e5b62f6e3b55cb6573505c4f179b461
Remove redundant null pointer check in operator delete

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.

_aligned_free on MSDN:

    If memblock is a NULL pointer, this function simply performs no actions.

Reviewers: EricWF, mclow.lists

Subscribers: christof, ldionne, cfe-commits, libcxx-commits

Differential Revision: https://reviews.llvm.org/D52401

llvm-svn: 342936
libcxx/src/new.cpp