[PATCH] D98632: [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 15 06:25:11 PDT 2021


zahiraam created this revision.
zahiraam added a reviewer: aaron.ballman.
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/D98632

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


Index: llvm/include/llvm/Support/FormatVariadicDetails.h
===================================================================
--- llvm/include/llvm/Support/FormatVariadicDetails.h
+++ llvm/include/llvm/Support/FormatVariadicDetails.h
@@ -48,7 +48,7 @@
   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 @@
 
 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>();
 }
 }
Index: llvm/include/llvm/Support/Error.h
===================================================================
--- llvm/include/llvm/Support/Error.h
+++ llvm/include/llvm/Support/Error.h
@@ -592,7 +592,7 @@
   }
 
   template <class T1, class T2>
-  static bool compareThisIfSameType(const T1 &a, const T2 &b) {
+  static bool compareThisIfSameType(const T1 &, const T2 &) {
     return false;
   }
 
Index: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
===================================================================
--- llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -255,7 +255,7 @@
 }
 
 template <class T>
-bool operator==(std::nullptr_t A, const IntrusiveRefCntPtr<T> &B) {
+bool operator==(std::nullptr_t, const IntrusiveRefCntPtr<T> &B) {
   return !B;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98632.330633.patch
Type: text/x-patch
Size: 1600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210315/d580347c/attachment.bin>


More information about the llvm-commits mailing list