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

Zahira Ammarguellat via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 09:17:31 PDT 2021


Author: Zahira Ammarguellat
Date: 2021-03-15T12:17:11-04:00
New Revision: 80ca4fd1544985154ef73669a3550b09c75c8f4d

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

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

Added: 
    

Modified: 
    llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
    llvm/include/llvm/Support/Error.h
    llvm/include/llvm/Support/FormatVariadicDetails.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
index f3dead8636d4..9715c9d01b98 100644
--- a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -255,7 +255,7 @@ inline bool operator!=(T *A, const IntrusiveRefCntPtr<U> &B) {
 }
 
 template <class T>
-bool operator==(std::nullptr_t A, const IntrusiveRefCntPtr<T> &B) {
+bool operator==(std::nullptr_t, const IntrusiveRefCntPtr<T> &B) {
   return !B;
 }
 

diff  --git a/llvm/include/llvm/Support/Error.h b/llvm/include/llvm/Support/Error.h
index c0f7c10aefb4..9c2942ba7b7b 100644
--- a/llvm/include/llvm/Support/Error.h
+++ b/llvm/include/llvm/Support/Error.h
@@ -592,7 +592,7 @@ template <class T> class LLVM_NODISCARD Expected {
   }
 
   template <class T1, class T2>
-  static bool compareThisIfSameType(const T1 &a, const T2 &b) {
+  static bool compareThisIfSameType(const T1 &, const T2 &) {
     return false;
   }
 

diff  --git a/llvm/include/llvm/Support/FormatVariadicDetails.h b/llvm/include/llvm/Support/FormatVariadicDetails.h
index 1a5eb3f3b4ae..08f8fc61f69b 100644
--- a/llvm/include/llvm/Support/FormatVariadicDetails.h
+++ b/llvm/include/llvm/Support/FormatVariadicDetails.h
@@ -48,7 +48,7 @@ class stream_operator_format_adapter : public format_adapter {
   explicit stream_operator_format_adapter(T &&Item)
       : Item(std::forward<T>(Item)) {}
 
-  void format(llvm::raw_ostream &S, StringRef Options) override { S << Item; }
+  void format(llvm::raw_ostream &S, StringRef) override { S << Item; }
 };
 
 template <typename T> class missing_format_adapter;
@@ -153,7 +153,7 @@ build_format_adapter(T &&Item) {
 
 template <typename T>
 std::enable_if_t<uses_missing_provider<T>::value, missing_format_adapter<T>>
-build_format_adapter(T &&Item) {
+build_format_adapter(T &&) {
   return missing_format_adapter<T>();
 }
 }


        


More information about the llvm-commits mailing list