summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-31 04:03:12 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-31 04:03:12 +0000
commit8c6eeb9599456a8ed12e8ce280e12b1e52abe031 (patch)
tree9e8ef12f224eaba30057e757a31298bc82f4adb8 /clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
parentb0944392aab9b9ed88cf7800aa9fb9cc1ad5c131 (diff)
downloadbcm5719-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.cpp9
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'}}
+}
OpenPOWER on IntegriCloud