2012-12-26 08:13:29 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wall %s
|
|
|
|
|
|
|
|
namespace test1 {
|
|
|
|
static void f() {} // expected-warning {{is not needed and will not be emitted}}
|
|
|
|
static void f();
|
|
|
|
template <typename T>
|
|
|
|
void foo() {
|
|
|
|
f();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace test2 {
|
|
|
|
static void f() {}
|
|
|
|
static void f();
|
|
|
|
static void g() { f(); }
|
|
|
|
void h() { g(); }
|
|
|
|
}
|
2012-12-26 12:38:44 +08:00
|
|
|
|
|
|
|
namespace test3 {
|
|
|
|
static void f();
|
|
|
|
template<typename T>
|
|
|
|
static void g() {
|
|
|
|
f();
|
|
|
|
}
|
|
|
|
static void f() {
|
|
|
|
}
|
|
|
|
void h() {
|
|
|
|
g<int>();
|
|
|
|
}
|
|
|
|
}
|
2013-01-09 03:43:34 +08:00
|
|
|
|
|
|
|
namespace test4 {
|
|
|
|
static void f();
|
|
|
|
static void f();
|
|
|
|
template<typename T>
|
|
|
|
static void g() {
|
|
|
|
f();
|
|
|
|
}
|
|
|
|
static void f() {
|
|
|
|
}
|
|
|
|
void h() {
|
|
|
|
g<int>();
|
|
|
|
}
|
|
|
|
}
|
2013-10-23 05:56:29 +08:00
|
|
|
|
|
|
|
namespace test4 {
|
|
|
|
static void func();
|
|
|
|
void bar() {
|
|
|
|
void func();
|
|
|
|
func();
|
|
|
|
}
|
|
|
|
static void func() {}
|
|
|
|
}
|