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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs