[libc++] Eliminate macro _LIBCPP_UNUSED_VAR. NFCI.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Mon, 19 Apr 2021 02:17:44 +0000 (22:17 -0400)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Thu, 22 Apr 2021 16:02:22 +0000 (12:02 -0400)
Reviewed as part of https://reviews.llvm.org/D100737

libcxx/include/__config
libcxx/include/locale

index f69df51..0f54cfd 100644 (file)
@@ -1421,8 +1421,6 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container(
 #  endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
 #endif // _LIBCPP_NO_AUTO_LINK
 
-#define _LIBCPP_UNUSED_VAR(x) ((void)(x))
-
 // Configures the fopen close-on-exec mode character, if any. This string will
 // be appended to any mode string used by fstream for fopen/fdopen.
 //
index 2a8eed6..664c470 100644 (file)
@@ -3572,7 +3572,7 @@ messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
         __cat = static_cast<catalog>((static_cast<size_t>(__cat) >> 1));
     return __cat;
 #else // !_LIBCPP_HAS_CATOPEN
-    _LIBCPP_UNUSED_VAR(__nm);
+    (void)__nm;
     return -1;
 #endif // _LIBCPP_HAS_CATOPEN
 }
@@ -3596,9 +3596,9 @@ messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
                                                         __n, __n + _VSTD::strlen(__n));
     return __w;
 #else // !_LIBCPP_HAS_CATOPEN
-    _LIBCPP_UNUSED_VAR(__c);
-    _LIBCPP_UNUSED_VAR(__set);
-    _LIBCPP_UNUSED_VAR(__msgid);
+    (void)__c;
+    (void)__set;
+    (void)__msgid;
     return __dflt;
 #endif // _LIBCPP_HAS_CATOPEN
 }
@@ -3613,7 +3613,7 @@ messages<_CharT>::do_close(catalog __c) const
     nl_catd __cat = (nl_catd)__c;
     catclose(__cat);
 #else // !_LIBCPP_HAS_CATOPEN
-    _LIBCPP_UNUSED_VAR(__c);
+    (void)__c;
 #endif // _LIBCPP_HAS_CATOPEN
 }