1 // RUN: %clang_cc1 -fsyntax-only -verify %s
33 // Test reference binding via an lvalue conversion function.
39 // Test conversion followed by copy-construction
43 Base(const FunkyDerived
&);
46 struct Derived
: Base
{ };
48 struct FunkyDerived
: Base
{ };
50 struct ConvertibleToBase
{
54 struct ConvertibleToDerived
{
58 struct ConvertibleToFunkyDerived
{
59 operator FunkyDerived();
62 void test_conversion(ConvertibleToBase ctb
, ConvertibleToDerived ctd
,
63 ConvertibleToFunkyDerived ctfd
) {
72 X1(X1
&); // expected-note{{candidate constructor not viable: expects an lvalue for 1st argument}}
83 int &ir
= f(b
); // expected-error{{no viable constructor copying parameter of type 'X1'}}
86 namespace rdar10202900
{
92 A(int i
); // expected-note{{declared private here}}
97 a
= b
; // expected-error{{calling a private constructor of class 'rdar10202900::A'}}