Index: clang/include/clang/Basic/DiagnosticGroups.td =================================================================== --- clang/include/clang/Basic/DiagnosticGroups.td +++ clang/include/clang/Basic/DiagnosticGroups.td @@ -929,7 +929,7 @@ def Unused : DiagGroup<"unused", [UnusedArgument, UnusedFunction, UnusedLabel, // UnusedParameter, (matches GCC's behavior) - // UnusedTemplate, (clean-up libc++ before enabling) + UnusedTemplate, // UnusedMemberFunction, (clean-up llvm before enabling) UnusedPrivateField, UnusedLambdaCapture, UnusedLocalTypedef, UnusedValue, UnusedVariable, Index: clang/test/Misc/warning-wall.c =================================================================== --- clang/test/Misc/warning-wall.c +++ clang/test/Misc/warning-wall.c @@ -66,6 +66,8 @@ CHECK-NEXT: -Wunused-function CHECK-NEXT: -Wunneeded-internal-declaration CHECK-NEXT: -Wunused-label +CHECK-NEXT: -Wunused-template +CHECK-NEXT: -Wunneeded-internal-declaration CHECK-NEXT: -Wunused-private-field CHECK-NEXT: -Wunused-lambda-capture CHECK-NEXT: -Wunused-local-typedef Index: clang/test/SemaCXX/warn-func-not-needed.cpp =================================================================== --- clang/test/SemaCXX/warn-func-not-needed.cpp +++ clang/test/SemaCXX/warn-func-not-needed.cpp @@ -10,7 +10,7 @@ } namespace test1_template { -template static void f() {} +template static void f() {} // expected-warning {{unused function template}} template <> void f() {} // expected-warning {{function 'f' is not needed and will not be emitted}} template void foo() { Index: clang/test/SemaCXX/warn-variable-not-needed.cpp =================================================================== --- clang/test/SemaCXX/warn-variable-not-needed.cpp +++ clang/test/SemaCXX/warn-variable-not-needed.cpp @@ -4,7 +4,7 @@ static int abc = 42; // expected-warning {{variable 'abc' is not needed and will not be emitted}} namespace { - template int abc_template = 0; + template int abc_template = 0; //expected-warning {{unused variable template}} template <> int abc_template = 0; // expected-warning {{variable 'abc_template' is not needed and will not be emitted}} } // namespace template