[PATCH] D43159: Modernize: Use nullptr more.
Louis Dionne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 4 09:55:33 PDT 2019
ldionne added inline comments.
================
Comment at: include/__threading_support:323
bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
- return *__t == 0;
+ return *__t == nullptr;
}
----------------
mclow.lists wrote:
> mclow.lists wrote:
> > This one is wrong.
> `__libcpp_thread_t` is an alias for an operating-system specific type.
> On Mac OS, it is a pointer to some Darwin-specific type.
> On Ubuntu, it is a `const unsigned long`.
>
> You can't compare it to `nullptr`.
>
I think the comparison should be `*__t == __libcpp_thread_t()`.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D43159/new/
https://reviews.llvm.org/D43159
More information about the cfe-commits
mailing list