blob: 461b9e597d256b127035c55cd9e7c808450eb54d [file] [log] [blame]
Daniel Dunbar2475d762009-11-08 01:47:25 +00001// RUN: clang-cc -fsyntax-only -verify %s
2// XFAIL: *
John Thompson59cbea92009-10-13 05:45:19 +00003
4namespace A {
5 int VA;
6 void FA() {}
7 struct SA { int V; };
8}
9
10using A::VA;
11using A::FA;
12using typename A::SA;
13
Douglas Gregor67f44b12009-11-25 19:28:08 +000014int main()
John Thompson59cbea92009-10-13 05:45:19 +000015{
16 VA = 1;
17 FA();
18 SA x; //Still needs handling.
19}
20
21struct B {
22 void f(char){};
23 void g(char){};
24};
25struct D : B {
26 using B::f;
27 void f(int);
28 void g(int);
29};
30void D::f(int) { f('c'); } // calls B::f(char)
31void D::g(int) { g('c'); } // recursively calls D::g(int)
32
33namespace E {
34 template <typename TYPE> int funcE(TYPE arg) { return(arg); }
35}
36
Douglas Gregor67f44b12009-11-25 19:28:08 +000037using E::funcE<int>; // expected-error{{using declaration can not refer to a template specialization}}
John Thompson59cbea92009-10-13 05:45:19 +000038
39namespace F {
40 struct X;
41}
42
43using F::X;
44// Should have some errors here. Waiting for implementation.
45void X(int);
46struct X *x;