[PATCH] D98204: [NFC] Fix "unused parameter" error revealed in the Linux self-build.

Zahira Ammarguellat via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 11:36:29 PST 2021


zahiraam created this revision.
zahiraam added a reviewer: bader.
Herald added a subscriber: dexonsmith.
zahiraam requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

https://reviews.llvm.org/D98204

Files:
  llvm/include/llvm/ADT/DenseMapInfo.h
  llvm/include/llvm/ADT/Hashing.h
  llvm/include/llvm/ADT/Optional.h
  llvm/include/llvm/Support/MathExtras.h


Index: llvm/include/llvm/Support/MathExtras.h
===================================================================
--- llvm/include/llvm/Support/MathExtras.h
+++ llvm/include/llvm/Support/MathExtras.h
@@ -399,6 +399,7 @@
 }
 template <unsigned N>
 constexpr inline std::enable_if_t<N >= 64, bool> isUInt(uint64_t X) {
+  (void)X;
   return true;
 }
 
Index: llvm/include/llvm/ADT/Optional.h
===================================================================
--- llvm/include/llvm/ADT/Optional.h
+++ llvm/include/llvm/ADT/Optional.h
@@ -382,6 +382,7 @@
 }
 
 template <typename T> constexpr bool operator<(const Optional<T> &X, NoneType) {
+  (void)X;
   return false;
 }
 
Index: llvm/include/llvm/ADT/Hashing.h
===================================================================
--- llvm/include/llvm/ADT/Hashing.h
+++ llvm/include/llvm/ADT/Hashing.h
@@ -657,6 +657,7 @@
 template <typename... Ts, std::size_t... Indices>
 hash_code hash_value_tuple_helper(const std::tuple<Ts...> &arg,
                                   std::index_sequence<Indices...> indices) {
+  (void)indices;
   return hash_combine(std::get<Indices>(arg)...);
 }
 
Index: llvm/include/llvm/ADT/DenseMapInfo.h
===================================================================
--- llvm/include/llvm/ADT/DenseMapInfo.h
+++ llvm/include/llvm/ADT/DenseMapInfo.h
@@ -259,6 +259,7 @@
 
   template <unsigned I>
   static unsigned getHashValueImpl(const Tuple &values, std::true_type) {
+    (void)values;
     return 0;
   }
 
@@ -269,6 +270,7 @@
 
   template <unsigned I>
   static bool isEqualImpl(const Tuple &lhs, const Tuple &rhs, std::false_type) {
+    (void)rhs;
     using EltType = typename std::tuple_element<I, Tuple>::type;
     std::integral_constant<bool, I + 1 == sizeof...(Ts)> atEnd;
     return DenseMapInfo<EltType>::isEqual(std::get<I>(lhs), std::get<I>(rhs)) &&
@@ -277,6 +279,7 @@
 
   template <unsigned I>
   static bool isEqualImpl(const Tuple &lhs, const Tuple &rhs, std::true_type) {
+    (void)lhs;
     return true;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98204.329081.patch
Type: text/x-patch
Size: 2066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210308/5b3979ce/attachment.bin>


More information about the llvm-commits mailing list