diff --git a/llvm/include/llvm/Support/FormatProviders.h b/llvm/include/llvm/Support/FormatProviders.h --- a/llvm/include/llvm/Support/FormatProviders.h +++ b/llvm/include/llvm/Support/FormatProviders.h @@ -355,7 +355,6 @@ template class format_provider> { using value = typename std::iterator_traits::value_type; - using reference = typename std::iterator_traits::reference; static StringRef consumeOneOption(StringRef &Style, char Indicator, StringRef Default) { @@ -403,15 +402,13 @@ auto Begin = V.begin(); auto End = V.end(); if (Begin != End) { - auto Adapter = - detail::build_format_adapter(std::forward(*Begin)); + auto Adapter = detail::build_format_adapter(*Begin); Adapter.format(Stream, ArgStyle); ++Begin; } while (Begin != End) { Stream << Sep; - auto Adapter = - detail::build_format_adapter(std::forward(*Begin)); + auto Adapter = detail::build_format_adapter(*Begin); Adapter.format(Stream, ArgStyle); ++Begin; } diff --git a/llvm/include/llvm/Support/FormatVariadicDetails.h b/llvm/include/llvm/Support/FormatVariadicDetails.h --- a/llvm/include/llvm/Support/FormatVariadicDetails.h +++ b/llvm/include/llvm/Support/FormatVariadicDetails.h @@ -75,8 +75,6 @@ // Test if raw_ostream& << T -> raw_ostream& is findable via ADL. template class has_StreamOperator { public: - using ConstRefT = const std::decay_t &; - template static char test( std::enable_if_t() @@ -86,7 +84,7 @@ template static double test(...); - static bool const value = (sizeof(test(nullptr)) == 1); + static bool const value = (sizeof(test(nullptr)) == 1); }; // Simple template that decides whether a type T should use the member-function