blob: 289d5c92ecff01c38b3a74b4665179487e5ffaca [file] [log] [blame]
Douglas Gregor7ad5d422010-11-09 21:07:58 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3int ovl(int);
4float ovl(float);
5
6template<typename T> T ovl(T);
7
8void 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}