[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / warn-member-not-needed.cpp
blobc48447719ba99ec92e451897e8b74c90827141b3
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wunneeded-member-function -Wno-unused-template %s
3 namespace {
4 class A {
5 void g() {} // expected-warning {{member function 'g' is not needed and will not be emitted}}
6 template <typename T> void gt(T) {}
7 template <> void gt<int>(int) {} // expected-warning {{member function 'gt<int>' is not needed and will not be emitted}}
8 template <> void gt(float) {} // expected-warning {{member function 'gt<float>' is not needed and will not be emitted}}
10 template <typename T>
11 void foo() {
12 g();
13 gt(0);
14 gt(0.0f);
15 gt(0.0);
18 template void A::gt(double); // no-warning