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