1 // RUN: %clang_cc1 -fsyntax-only -verify -Wunneeded-member-function -Wno-unused-template %s 2 3 namespace { 4 class A { g()5 void g() {} // expected-warning {{member function 'g' is not needed and will not be emitted}} gt(T)6 template <typename T> void gt(T) {} gt(int)7 template <> void gt<int>(int) {} // expected-warning {{member function 'gt<int>' is not needed and will not be emitted}} gt(float)8 template <> void gt(float) {} // expected-warning {{member function 'gt<float>' is not needed and will not be emitted}} 9 10 template <typename T> foo()11 void foo() { 12 g(); 13 gt(0); 14 gt(0.0f); 15 gt(0.0); 16 } 17 }; 18 template void A::gt(double); // no-warning 19 } 20