[PATCH] D56023: [libcxx] Mark do_open, do_get and do_close parameters unused when catopen is missing
Marshall Clow via Phabricator
reviews at reviews.llvm.org
Sun Dec 23 17:04:05 PST 2018
mclow.lists added inline comments.
Comment at: libcxx/include/locale:3565
messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
+#else // !_LIBCPP_HAS_CATOPEN
+messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
Looking at this, I frowned. It seems like a lot of text just to remove a parameter name.
I went looking in the rest of libc++, and I found places in `<unordered_map>` where we say `((void)__p)` and in `<stdexcept>` where we say `((void)__msg)` rather than conditionally remove the parameter name.
This makes me think that a `_LIBCPP_UNUSED_VAR` macro might be useful; it would make it clear what we're trying to accomplish: `#define _LIBCPP_UNUSED_VAR(x) ((void)(x))`
CHANGES SINCE LAST ACTION
More information about the libcxx-commits