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