// RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template int f(int); // expected-note {{candidate function}} #if __cplusplus <= 199711L // expected-note@-2 {{candidate function}} #endif template int f(int); // expected-note {{candidate function}} #if __cplusplus <= 199711L // expected-note@-2 {{candidate function}} #endif int i1 = f<1>(0); // expected-error{{call to 'f' is ambiguous}} int i2 = f<1000>(0); #if __cplusplus <= 199711L // expected-error@-2{{call to 'f' is ambiguous}} #endif namespace PR6707 { template struct X { }; template void f(X); void g(X x) { f(x); } static const unsigned char ten = 10; template void f2(X, X); // expected-note@-1 {{candidate template ignored: deduced values of conflicting types for parameter 'Value' (10 of type 'int' vs. 10 of type 'char')}} // expected-note@-2 {{candidate template ignored: deduced values of conflicting types for parameter 'Value' (10 of type 'char' vs. 10 of type 'int')}} void g2() { f2(X(), X()); // expected-error {{no matching}} f2(X(), X()); // expected-error {{no matching}} } }