From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- test/SemaCXX/overload-call.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'test/SemaCXX/overload-call.cpp') diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp index 6bf6965..81a88a3 100644 --- a/test/SemaCXX/overload-call.cpp +++ b/test/SemaCXX/overload-call.cpp @@ -317,8 +317,8 @@ namespace PR5756 { // Tests the exact text used to note the candidates namespace test1 { - template void foo(T t, unsigned N); // expected-note {{candidate function [with T = int] not viable: no known conversion from 'char const [6]' to 'unsigned int' for 2nd argument}} - void foo(int n, char N); // expected-note {{candidate function not viable: no known conversion from 'char const [6]' to 'char' for 2nd argument}} + template void foo(T t, unsigned N); // expected-note {{candidate function [with T = int] not viable: no known conversion from 'const char [6]' to 'unsigned int' for 2nd argument}} + void foo(int n, char N); // expected-note {{candidate function not viable: no known conversion from 'const char [6]' to 'char' for 2nd argument}} void foo(int n); // expected-note {{candidate function not viable: requires 1 argument, but 2 were provided}} void foo(unsigned n = 10); // expected-note {{candidate function not viable: requires at most 1 argument, but 2 were provided}} void foo(int n, const char *s, int t); // expected-note {{candidate function not viable: requires 3 arguments, but 2 were provided}} @@ -441,7 +441,7 @@ namespace PR6177 { void f(bool const volatile&); // expected-note{{passing argument to parameter here}} void f(String); - void g() { f(""); } // expected-error{{volatile lvalue reference to type 'bool const volatile' cannot bind to a value of unrelated type 'char const [1]'}} + void g() { f(""); } // expected-error{{volatile lvalue reference to type 'const volatile bool' cannot bind to a value of unrelated type 'const char [1]'}} } namespace PR7095 { @@ -490,3 +490,16 @@ namespace NontrivialSubsequence { foo(a); } } + +// rdar://rdar8499524 +namespace rdar8499524 { + struct W {}; + struct S { + S(...); + }; + + void g(const S&); + void f() { + g(W()); + } +} -- cgit v1.1