blob: fe4d167fe27d9a538c309674c8b8e8c93e38b830 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Anders Carlssonbc13ab22009-06-26 03:54:13 +00002
3extern "C" { void f(bool); }
4
5namespace std {
6 using ::f;
7 inline void f() { return f(true); }
8}
Douglas Gregor2531c2d2009-09-28 00:47:05 +00009
10namespace M {
11 void f(float);
12}
13
14namespace N {
15 using M::f;
16 void f(int) { } // expected-note{{previous}}
17
18 void f(int) { } // expected-error{{redefinition}}
19}
Douglas Gregor891fdae2009-11-15 08:11:13 +000020
21namespace N {
22 void f(double);
23 void f(long);
24}
25
26struct X0 {
27 void operator()(int);
28 void operator()(long);
29};
30
31struct X1 : X0 {
32 // FIXME: give this operator() a 'float' parameter to test overloading
33 // behavior. It currently fails.
34 void operator()();
35 using X0::operator();
36
37 void test() {
38 (*this)(1);
39 }
40};
Anders Carlssonca910e82009-12-09 04:26:02 +000041
42struct A { void f(); };
43struct B : A { };
44class C : B { using B::f; };