blob: b51aedc54aca464f49d951aec83521a305081f0d [file] [log] [blame]
Argyrios Kyrtzidisbbc64542010-08-15 01:15:20 +00001// 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 struct VS {
27 virtual void vm() { }
28 };
29
30 struct SVS : public VS {
31 void vm() { }
32 };
33}
34
35void S::m3() { } // expected-warning{{unused}}
36
37static inline void f4() { }
38const unsigned int cx = 0;
39
40static int x1; // expected-warning{{unused}}
41
42namespace {
43 int x2; // expected-warning{{unused}}
44
45 struct S2 {
46 static int x; // expected-warning{{unused}}
47 };
48
49 template <typename T>
50 struct TS2 {
51 static int x;
52 };
53 template <> int TS2<int>::x; // expected-warning{{unused}}
54}