[PATCH] D143524: Make the -Wunused-template default.
Vassil Vassilev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 23 10:37:16 PST 2023
v.g.vassilev marked an inline comment as done.
v.g.vassilev added inline comments.
================
Comment at: clang/test/SemaCXX/warn-func-not-needed.cpp:13
namespace test1_template {
-template <typename T> static void f() {}
+template <typename T> static void f() {} // expected-warning {{unused function template}}
template <> void f<int>() {} // expected-warning {{function 'f<int>' is not needed and will not be emitted}}
----------------
aaron.ballman wrote:
> Why is this unused? `f<long>()` in `foo()` should cause this to be used, right?
>
> How should a user silence this diagnostic without disabling it entirely?
Nobody uses `foo`.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143524/new/
https://reviews.llvm.org/D143524
More information about the cfe-commits
mailing list