http://llvm.org/bugs/show_bug.cgi?id=14733
Bug #: 14733
Summary: Warn on unused file-scoped templates
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Keywords: googler
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Clang currently warns on unused file-scoped entities like:
static void func(int) { }
but does not warn on unused file-scoped templates like:
template<typename T>
static void func(T) { }
I assume this is because Clang's -Wunused is powered by similar/the same logic
as is used to choose which symbols to emit in CodeGen. Templates aren't,
themselves, emittable symbols in that sense, so we don't warn about them.
What we should do is warn about any file-scoped (class or function) template
with no specializations.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs