2009-06-27 10:45:02 +00:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
|
|
|
|
|
|
|
extern "C" { void f(bool); }
|
|
|
|
|
|
|
|
namespace std {
|
|
|
|
using ::f;
|
|
|
|
inline void f() { return f(true); }
|
|
|
|
}
|
2009-10-14 18:03:49 +00:00
|
|
|
|
|
|
|
namespace M {
|
|
|
|
void f(float);
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace N {
|
|
|
|
using M::f;
|
|
|
|
void f(int) { } // expected-note{{previous}}
|
|
|
|
|
|
|
|
void f(int) { } // expected-error{{redefinition}}
|
|
|
|
}
|
2009-11-18 14:59:57 +00:00
|
|
|
|
|
|
|
namespace N {
|
|
|
|
void f(double);
|
|
|
|
void f(long);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct X0 {
|
|
|
|
void operator()(int);
|
|
|
|
void operator()(long);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct X1 : X0 {
|
|
|
|
// FIXME: give this operator() a 'float' parameter to test overloading
|
|
|
|
// behavior. It currently fails.
|
|
|
|
void operator()();
|
|
|
|
using X0::operator();
|
|
|
|
|
|
|
|
void test() {
|
|
|
|
(*this)(1);
|
|
|
|
}
|
|
|
|
};
|
2009-12-15 18:49:47 +00:00
|
|
|
|
|
|
|
struct A { void f(); };
|
|
|
|
struct B : A { };
|
|
|
|
class C : B { using B::f; };
|