[llvm] c2006f8 - [NFC] Fix "unused parameter" error revealed in the Linux self-build.

Zahira Ammarguellat via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 10:36:56 PST 2021


Author: Zahira Ammarguellat
Date: 2021-03-12T10:26:40-08:00
New Revision: c2006f857d80f54b90ed7d911d3e7acf4f46001b

URL: https://github.com/llvm/llvm-project/commit/c2006f857d80f54b90ed7d911d3e7acf4f46001b
DIFF: https://github.com/llvm/llvm-project/commit/c2006f857d80f54b90ed7d911d3e7acf4f46001b.diff

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/DenseMapInfo.h b/llvm/include/llvm/ADT/DenseMapInfo.h
index 8271b9334b86..cbfbc86918cc 100644
--- a/llvm/include/llvm/ADT/DenseMapInfo.h
+++ b/llvm/include/llvm/ADT/DenseMapInfo.h
@@ -258,7 +258,7 @@ template <typename... Ts> struct DenseMapInfo<std::tuple<Ts...>> {
   }
 
   template <unsigned I>
-  static unsigned getHashValueImpl(const Tuple &values, std::true_type) {
+  static unsigned getHashValueImpl(const Tuple &, std::true_type) {
     return 0;
   }
 
@@ -276,7 +276,7 @@ template <typename... Ts> struct DenseMapInfo<std::tuple<Ts...>> {
   }
 
   template <unsigned I>
-  static bool isEqualImpl(const Tuple &lhs, const Tuple &rhs, std::true_type) {
+  static bool isEqualImpl(const Tuple &, const Tuple &, std::true_type) {
     return true;
   }
 

diff  --git a/llvm/include/llvm/ADT/Hashing.h b/llvm/include/llvm/ADT/Hashing.h
index cb53b7fa7469..e296c1c53ebd 100644
--- a/llvm/include/llvm/ADT/Hashing.h
+++ b/llvm/include/llvm/ADT/Hashing.h
@@ -656,7 +656,7 @@ namespace detail {
 
 template <typename... Ts, std::size_t... Indices>
 hash_code hash_value_tuple_helper(const std::tuple<Ts...> &arg,
-                                  std::index_sequence<Indices...> indices) {
+                                  std::index_sequence<Indices...>) {
   return hash_combine(std::get<Indices>(arg)...);
 }
 

diff  --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h
index a285c81d1be8..67bd1f5f1a54 100644
--- a/llvm/include/llvm/ADT/Optional.h
+++ b/llvm/include/llvm/ADT/Optional.h
@@ -381,7 +381,7 @@ constexpr bool operator!=(NoneType, const Optional<T> &X) {
   return X != None;
 }
 
-template <typename T> constexpr bool operator<(const Optional<T> &X, NoneType) {
+template <typename T> constexpr bool operator<(const Optional<T> &, NoneType) {
   return false;
 }
 

diff  --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index 33b9065261e8..ec9b5008792e 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -398,7 +398,7 @@ constexpr inline std::enable_if_t<(N < 64), bool> isUInt(uint64_t X) {
   return X < (UINT64_C(1) << (N));
 }
 template <unsigned N>
-constexpr inline std::enable_if_t<N >= 64, bool> isUInt(uint64_t X) {
+constexpr inline std::enable_if_t<N >= 64, bool> isUInt(uint64_t) {
   return true;
 }
 


        


More information about the llvm-commits mailing list