blob: 56bfb2f32747be508e3d599c551a0853f97e7659 [file] [log] [blame]
Daniel Dunbar9f9fbd62009-07-25 11:55:03 +00001// FIXME: Disabled, appears to have undefined behavior, and needs to be updated to match new warnings.
2// RUN: true
3
4// RUNX: clang-cc -fsyntax-only -verify %s
Douglas Gregor9cfbe482009-06-20 00:51:54 +00005
6namespace A {
7 int VA;
8 void FA() {}
9 struct SA { int V; };
10}
11
12using A::VA;
13using A::FA;
14using typename A::SA;
15
16void main()
17{
18 VA = 1;
19 FA();
20 SA x; //Still needs handling.
21}
22
23struct B {
24 void f(char){};
25 void g(char){};
26};
27struct D : B {
28 using B::f;
29 void f(int);
30 void g(int);
31};
32void D::f(int) { f('c'); } // calls B::f(char)
33void D::g(int) { g('c'); } // recursively calls D::g(int)
34
35namespace E {
36 template <typename TYPE> int funcE(TYPE arg) { return(arg); }
37}
38
39using E::funcE<int>; // expected-error{{use of template specialization in using directive not allowed}}
40
41namespace F {
42 struct X;
43}
44
45using F::X;
46// Should have some errors here. Waiting for implementation.
47void X(int);
48struct X *x;