[PATCH] D143524: Make the -Wunused-template default.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 23 10:09:41 PST 2023
aaron.ballman added a reviewer: libc++.
aaron.ballman added a comment.
Precommit CI shows issues with the libc++ tests that need to be addressed. This should also come with a release note.
================
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}}
----------------
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?
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