Douglas Gregor | 7ad5d42 | 2010-11-09 21:07:58 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | int ovl(int); |
| 4 | float ovl(float); |
| 5 | |
| 6 | template<typename T> T ovl(T); |
| 7 | |
| 8 | void test(bool b) { |
| 9 | (void)((void)0, ovl); // expected-error{{cannot resolve overloaded function from context}} |
| 10 | // PR7863 |
| 11 | (void)(b? ovl : &ovl); // expected-error{{cannot resolve overloaded function from context}} |
| 12 | (void)(b? ovl<float> : &ovl); // expected-error{{cannot resolve overloaded function from context}} |
| 13 | (void)(b? ovl<float> : ovl<float>); |
| 14 | } |