diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-31 04:03:12 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-31 04:03:12 +0000 |
commit | 0efa62f2096f28a610ac2ea8d2651448a7ec89c7 (patch) | |
tree | 30a40bca1113463e5a0831c7003b45fe0a0eda7d /test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | |
parent | 995e26b0523ac8e3b6199a509b871b81fa5df6ee (diff) |
Replace "failed template argument deduction" diagnostic with something useful
in the one case where we've already factored out a reason code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index 4fd419dc74..88571d671b 100644 --- a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -199,3 +199,12 @@ namespace initlist_of_array { f({{1,2},{3,4}}); } } + +namespace init_list_deduction_failure { + void f(); + void f(int); + template<typename T> void g(std::initializer_list<T>); + // expected-note@-1 {{candidate template ignored: couldn't resolve reference to overloaded function 'f'}} + void h() { g({f}); } + // expected-error@-1 {{no matching function for call to 'g'}} +} |