Douglas Gregor | f1991ea | 2008-11-07 22:36:19 +0000 | [diff] [blame] | 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 | } |