diff --git a/.clangd b/.clangd index 7b82220acbd8..971c6f182ddf 100644 --- a/.clangd +++ b/.clangd @@ -11,7 +11,8 @@ Diagnostics: # compiler. # `unused-includes`: has false positives, reporting includes unused when # they are used. Probably the same root cause as unused-function. - Suppress: [unused-function, unused-includes] + # `unused-template`: has false positives, which we see in eval.cpp. + Suppress: [unused-function, unused-includes, unused-template] --- diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index 2b6b9072704a..ce5523a0c881 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -878,12 +878,8 @@ static auto ReplaceFieldWithConstantValue(EvalContext& eval_context, // Function template that can be called with an argument of type `T`. Used below // to detect which overloads of `GetConstantValue` exist. -// -// Marked as maybe unused at it seems the use in a requires isn't tracked by the -// latest version of Clang's `-Wunused-template`. -// https://github.com/llvm/llvm-project/issues/218429 template -[[maybe_unused]] static auto Accept(T /*arg*/) -> void {} +static auto Accept(T /*arg*/) -> void {} // Determines whether a `GetConstantValue` overload exists for a given ID type. // Note that we do not check whether `GetConstantValue` is *callable* with a