From 75a089166ded4bbef25eb3ad96d51bc3981a9138 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 15 Mar 2021 12:15:34 -0400 Subject: [PATCH] [NFC] Fix "unused parameter" error revealed in the Linux self-build. --- include/llvm/ADT/IntrusiveRefCntPtr.h | 2 +- include/llvm/Support/Error.h | 2 +- include/llvm/Support/FormatVariadicDetails.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h index f3dead8636d..9715c9d01b9 100644 --- a/include/llvm/ADT/IntrusiveRefCntPtr.h +++ b/include/llvm/ADT/IntrusiveRefCntPtr.h @@ -255,7 +255,7 @@ inline bool operator!=(T *A, const IntrusiveRefCntPtr &B) { } template -bool operator==(std::nullptr_t A, const IntrusiveRefCntPtr &B) { +bool operator==(std::nullptr_t, const IntrusiveRefCntPtr &B) { return !B; } diff --git a/include/llvm/Support/Error.h b/include/llvm/Support/Error.h index c0f7c10aefb..9c2942ba7b7 100644 --- a/include/llvm/Support/Error.h +++ b/include/llvm/Support/Error.h @@ -592,7 +592,7 @@ private: } template - static bool compareThisIfSameType(const T1 &a, const T2 &b) { + static bool compareThisIfSameType(const T1 &, const T2 &) { return false; } diff --git a/include/llvm/Support/FormatVariadicDetails.h b/include/llvm/Support/FormatVariadicDetails.h index 1a5eb3f3b4a..08f8fc61f69 100644 --- a/include/llvm/Support/FormatVariadicDetails.h +++ b/include/llvm/Support/FormatVariadicDetails.h @@ -48,7 +48,7 @@ public: explicit stream_operator_format_adapter(T &&Item) : Item(std::forward(Item)) {} - void format(llvm::raw_ostream &S, StringRef Options) override { S << Item; } + void format(llvm::raw_ostream &S, StringRef) override { S << Item; } }; template class missing_format_adapter; @@ -153,7 +153,7 @@ build_format_adapter(T &&Item) { template std::enable_if_t::value, missing_format_adapter> -build_format_adapter(T &&Item) { +build_format_adapter(T &&) { return missing_format_adapter(); } }