summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-01-05 02:31:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-01-05 02:31:32 +0000
commitec7176e2235ae05e088dd3879a3b41104855388b (patch)
tree621ec244cc47df73e17c84a86839fd56552065a5 /clang/test/SemaTemplate/deduction.cpp
parent4a23563c580b815f296ed50baf8234abd8b88607 (diff)
downloadbcm5719-llvm-ec7176e2235ae05e088dd3879a3b41104855388b.tar.gz
bcm5719-llvm-ec7176e2235ae05e088dd3879a3b41104855388b.zip
Fix assertion failure on deduction failure due to too short template argument list.
We were previously incorrectly using TDK_TooFewArguments to report a template argument list that's too short, but it actually means that the number of arguments in a top-level function call was insufficient. When diagnosing the problem, SemaOverload would (rightly) assert that the failure kind didn't make any sense. llvm-svn: 291064
Diffstat (limited to 'clang/test/SemaTemplate/deduction.cpp')
-rw-r--r--clang/test/SemaTemplate/deduction.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/deduction.cpp b/clang/test/SemaTemplate/deduction.cpp
index 5695cab9a27..f98fd9bea0c 100644
--- a/clang/test/SemaTemplate/deduction.cpp
+++ b/clang/test/SemaTemplate/deduction.cpp
@@ -407,3 +407,10 @@ namespace overload_vs_pack {
void test() { j(x, f, x); }
}
}
+
+namespace b29946541 {
+ template<typename> class A {};
+ template<typename T, typename U, template<typename, typename> class C>
+ void f(C<T, U>); // expected-note {{failed template argument deduction}}
+ void g(A<int> a) { f(a); } // expected-error {{no match}}
+}
OpenPOWER on IntegriCloud