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 | 8c6eeb9599456a8ed12e8ce280e12b1e52abe031 (patch) | |
tree | 9e8ef12f224eaba30057e757a31298bc82f4adb8 /clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | |
parent | b0944392aab9b9ed88cf7800aa9fb9cc1ad5c131 (diff) | |
download | bcm5719-llvm-8c6eeb9599456a8ed12e8ce280e12b1e52abe031.tar.gz bcm5719-llvm-8c6eeb9599456a8ed12e8ce280e12b1e52abe031.zip |
Replace "failed template argument deduction" diagnostic with something useful
in the one case where we've already factored out a reason code.
llvm-svn: 174036
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index 4fd419dc748..88571d671b0 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/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'}} +} |