warn-unused-filescoped.cpp [plain text]
static void f1();
namespace {
void f2();
void f3() { }
struct S {
void m1() { } void m2(); void m3();
S(const S&);
void operator=(const S&);
};
template <typename T>
struct TS {
void m();
};
template <> void TS<int>::m() { }
template <typename T>
void tf() { }
template <> void tf<int>() { }
struct VS {
virtual void vm() { }
};
struct SVS : public VS {
void vm() { }
};
}
void S::m3() { }
static inline void f4() { }
const unsigned int cx = 0;
static int x1;
namespace {
int x2;
struct S2 {
static int x; };
template <typename T>
struct TS2 {
static int x;
};
template <> int TS2<int>::x; }
namespace PR8841 {
namespace {
template <typename T> struct X {
friend bool operator==(const X&, const X&) { return false; }
};
}
template <typename T> void template_test(X<T> x) {
(void)(x == x);
}
void test() {
X<int> x;
template_test(x);
}
}
namespace test4 {
namespace { struct A {}; }
void test(A a); extern "C" void test4(A a);
}
namespace rdar8733476 {
static void foo() { }
template <int>
void bar() {
foo();
}
}