Anders Carlsson | bc13ab2 | 2009-06-26 03:54:13 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | extern "C" { void f(bool); } |
| 4 | |
| 5 | namespace std { |
| 6 | using ::f; |
| 7 | inline void f() { return f(true); } |
| 8 | } |
Douglas Gregor | 2531c2d | 2009-09-28 00:47:05 +0000 | [diff] [blame] | 9 | |
| 10 | namespace M { |
| 11 | void f(float); |
| 12 | } |
| 13 | |
| 14 | namespace N { |
| 15 | using M::f; |
| 16 | void f(int) { } // expected-note{{previous}} |
| 17 | |
| 18 | void f(int) { } // expected-error{{redefinition}} |
| 19 | } |
Douglas Gregor | 891fdae | 2009-11-15 08:11:13 +0000 | [diff] [blame] | 20 | |
| 21 | namespace N { |
| 22 | void f(double); |
| 23 | void f(long); |
| 24 | } |
| 25 | |
| 26 | struct X0 { |
| 27 | void operator()(int); |
| 28 | void operator()(long); |
| 29 | }; |
| 30 | |
| 31 | struct 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 | }; |