xref: /llvm-project/clang/test/SemaCXX/user-defined-conversions.cpp (revision a1f013e8edb827129c75bb2d6f49a625a3219f9d)
1 // RUN: clang -fsyntax-only -verify %s
2 struct X {
3   operator bool();
4 };
5 
6 int& f(bool);
7 float& f(int);
8 
9 void f_test(X x) {
10   int& i1 = f(x);
11 }
12 
13 struct Y {
14   operator short();
15   operator float();
16 };
17 
18 void g(int);
19 
20 void g_test(Y y) {
21   g(y);
22 }
23