Daniel Dunbar | 2475d76 | 2009-11-08 01:47:25 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | // XFAIL: * |
John Thompson | 59cbea9 | 2009-10-13 05:45:19 +0000 | [diff] [blame] | 3 | |
| 4 | namespace A { |
| 5 | int VA; |
| 6 | void FA() {} |
| 7 | struct SA { int V; }; |
| 8 | } |
| 9 | |
| 10 | using A::VA; |
| 11 | using A::FA; |
| 12 | using typename A::SA; |
| 13 | |
Douglas Gregor | 67f44b1 | 2009-11-25 19:28:08 +0000 | [diff] [blame] | 14 | int main() |
John Thompson | 59cbea9 | 2009-10-13 05:45:19 +0000 | [diff] [blame] | 15 | { |
| 16 | VA = 1; |
| 17 | FA(); |
| 18 | SA x; //Still needs handling. |
| 19 | } |
| 20 | |
| 21 | struct B { |
| 22 | void f(char){}; |
| 23 | void g(char){}; |
| 24 | }; |
| 25 | struct D : B { |
| 26 | using B::f; |
| 27 | void f(int); |
| 28 | void g(int); |
| 29 | }; |
| 30 | void D::f(int) { f('c'); } // calls B::f(char) |
| 31 | void D::g(int) { g('c'); } // recursively calls D::g(int) |
| 32 | |
| 33 | namespace E { |
| 34 | template <typename TYPE> int funcE(TYPE arg) { return(arg); } |
| 35 | } |
| 36 | |
Douglas Gregor | 67f44b1 | 2009-11-25 19:28:08 +0000 | [diff] [blame] | 37 | using E::funcE<int>; // expected-error{{using declaration can not refer to a template specialization}} |
John Thompson | 59cbea9 | 2009-10-13 05:45:19 +0000 | [diff] [blame] | 38 | |
| 39 | namespace F { |
| 40 | struct X; |
| 41 | } |
| 42 | |
| 43 | using F::X; |
| 44 | // Should have some errors here. Waiting for implementation. |
| 45 | void X(int); |
| 46 | struct X *x; |