1 // RUN: %clang_cc1 -fsyntax-only -verify -Wall %s
2 
3 namespace test1 {
4   static void f() {} // expected-warning {{is not needed and will not be emitted}}
5   static void f();
6   template <typename T>
7   void foo() {
8     f();
9   }
10 }
11 
12 namespace test2 {
13   static void f() {}
14   static void f();
15   static void g() { f(); }
16   void h() { g(); }
17 }
18 
19 namespace test3 {
20   static void f();
21   template<typename T>
22   static void g() {
23     f();
24   }
25   static void f() {
26   }
27   void h() {
28     g<int>();
29   }
30 }
31 
32 namespace test4 {
33   static void f();
34   static void f();
35   template<typename T>
36   static void g() {
37     f();
38   }
39   static void f() {
40   }
41   void h() {
42     g<int>();
43   }
44 }
45 
46 namespace test4 {
47   static void func();
48   void bar() {
49     void func();
50     func();
51   }
52   static void func() {}
53 }
54