Add include needed for MSVC.
[clang/acc.git] / test / SemaCXX / overload-call-copycon.cpp
blob755e27adbac8a7286c87962c12f8e56aa33abab0
1 // RUN: clang-cc -fsyntax-only %s
2 class X { };
4 int& copycon(X x);
5 float& copycon(...);
7 void test_copycon(X x, X const xc, X volatile xv) {
8 int& i1 = copycon(x);
9 int& i2 = copycon(xc);
10 float& f1 = copycon(xv);
13 class A {
14 public:
15 A(A&);
18 class B : public A { };
20 short& copycon2(A a);
21 int& copycon2(B b);
22 float& copycon2(...);
24 void test_copycon2(A a, const A ac, B b, B const bc, B volatile bv) {
25 int& i1 = copycon2(b);
26 float& f1 = copycon2(bc);
27 float& f2 = copycon2(bv);
28 short& s1 = copycon2(a);
29 float& f3 = copycon2(ac);
32 int& copycon3(A a);
33 float& copycon3(...);
35 void test_copycon3(B b, const B bc) {
36 int& i1 = copycon3(b);
37 float& f1 = copycon3(bc);
41 class C : public B { };
43 float& copycon4(A a);
44 int& copycon4(B b);
46 void test_copycon4(C c) {
47 int& i = copycon4(c);