// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
enumE2{};structA{operator E2&();// expected-note 3 {{candidate function}}
};structB{operator E2&();// expected-note 3 {{candidate function}}
};structC:B,A{};voidtest(C c){const E2 &e2 = c;// expected-error {{reference initialization of type 'const E2 &' with initializer of type 'C' is ambiguous}}
}voidfoo(const E2 &);// expected-note{{passing argument to parameter here}}
const E2 &re(C c){foo(c);// expected-error {{reference initialization of type 'const E2 &' with initializer of type 'C' is ambiguous}}
return c;// expected-error {{reference initialization of type 'const E2 &' with initializer of type 'C' is ambiguous}}
}namespaceCWG2352{voidf(constint*const&)=delete;voidf(int*);voidg(int*&);voidg(constint*)=delete;voidh1(int*const*const&);voidh1(constint*const*)=delete;voidh2(constint*const*const&)=delete;voidh2(int*const*);voidtest(){int*x;// Under CWG2352, this became ambiguous. We order by qualification
// conversion even when comparing a reference binding to a
// non-reference-binding.
f(x);g(x);h1(&x);h2(&x);}}