https://bugs.llvm.org/show_bug.cgi?id=41184
Bug ID: 41184
Summary: Wunused-template false positive when template not
ODR-used
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: da...@doublewise.net
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
The following code triggers Wunused-template:
#include <type_traits>
namespace {
template<typename T>
auto f() -> T;
static_assert(std::is_same_v<int, decltype(f<int>())>);
} // namespace
When compiled as clang++ -std=c++17 -Wunused-template
See it live: https://godbolt.org/z/1UooFs
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs