[libcxx-commits] [PATCH] D96408: Fix warnings when compiling libcxx for Windows with clang-cl /W4
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 8 05:33:44 PST 2021
Quuxplusone requested changes to this revision.
Quuxplusone added inline comments.
This revision now requires changes to proceed.
================
Comment at: libcxx/src/atomic.cpp:124
// We will monitor this value.
+ (void)__contention_state;
return __cxx_atomic_load(__platform_state, memory_order_acquire);
----------------
The comment on line 123 becomes misleading. Here I suggest following line 86's style:
```
static __cxx_contention_t __libcpp_contention_monitor_for_wait(__cxx_atomic_contention_t volatile*,
__cxx_atomic_contention_t const volatile* __platform_state)
{
// We will monitor this value.
return __cxx_atomic_load(__platform_state, memory_order_acquire);
}
```
IMO there should also be one blank line before this function, and one blank line after.
================
Comment at: libcxx/src/support/win32/locale_win32.cpp:22
{
+ (void)mask;
return {_create_locale( LC_ALL, locale ), locale};
----------------
Here we have two unused parameters: `mask` and `base`. I'd prefer to handle them both in the same way. I suggest
```
// FIXME: base and mask currently unused. Needs manual work to construct the new locale
locale_t newlocale(int /*mask*/, const char *locale, locale_t /*base*/)
{
return {_create_locale( LC_ALL, locale ), locale};
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96408/new/
https://reviews.llvm.org/D96408
More information about the libcxx-commits
mailing list