[PATCH] D52401: Remove redundant null pointer check in operator delete
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 23 01:31:46 PDT 2018
MaskRay added a comment.
In https://reviews.llvm.org/D52401#1243054, @ldionne wrote:
> Was this true pre-C11 too? If not, then this needs to be guarded by `#if _LIBCPP_STD_VER >= 17`, because C++ is only on top of C11 in C++17 and above (Marshall can double-check this).
Thanks for the note. It is true in C89 (http://port70.net/~nsz/c/c89/c89-draft.html).
"If ptr is a null pointer, no action occurs." Also similar wording in POSIX "If ptr is a null pointer, no action shall occur."
Repository:
rCXX libc++
https://reviews.llvm.org/D52401
More information about the cfe-commits
mailing list