From e65cd4ce832b52d7b625a1e01cbecb264f9d2716 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 23 Feb 2023 21:17:11 +0100 Subject: [libc++] Enable -Wunused-template Clang wants to enable this flag by default, but libc++ isn't working with it yet. Reviewed By: Mordante, #libc, #libc_abi, EricWF Spies: libcxx-commits, arichardson Differential Revision: https://reviews.llvm.org/D144667 --- libcxxabi/src/demangle/StringView.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libcxxabi') diff --git a/libcxxabi/src/demangle/StringView.h b/libcxxabi/src/demangle/StringView.h index 90890e3..07b7cf8 100644 --- a/libcxxabi/src/demangle/StringView.h +++ b/libcxxabi/src/demangle/StringView.h @@ -17,9 +17,16 @@ #define DEMANGLE_STRINGVIEW_H #include "DemangleConfig.h" + +#include <__cxxabi_config.h> #include #include +#ifdef _LIBCXXABI_COMPILER_CLANG +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-template" +#endif + DEMANGLE_NAMESPACE_BEGIN class StringView { @@ -119,4 +126,8 @@ inline bool operator==(const StringView &LHS, const StringView &RHS) { DEMANGLE_NAMESPACE_END +#ifdef _LIBCXXABI_COMPILER_CLANG +#pragma clang diagnostic pop +#endif + #endif -- cgit v1.1