warn-unused-filescoped.cpp revision f6d1d43d68016e975f22264343631a55b9701495
1// RUN: %clang_cc1 -fsyntax-only -verify -Wunused %s
2
3static void f1(); // expected-warning{{unused}}
4
5namespace {
6  void f2();  // expected-warning{{unused}}
7
8  void f3() { }  // expected-warning{{unused}}
9
10  struct S {
11    void m1() { }  // expected-warning{{unused}}
12    void m2();  // expected-warning{{unused}}
13    void m3();
14  };
15
16  template <typename T>
17  struct TS {
18    void m();
19  };
20  template <> void TS<int>::m() { }  // expected-warning{{unused}}
21
22  template <typename T>
23  void tf() { }
24  template <> void tf<int>() { }  // expected-warning{{unused}}
25}
26
27void S::m3() { }  // expected-warning{{unused}}
28