diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-05 02:31:32 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-05 02:31:32 +0000 |
commit | cf2ed0b529c8fb34b2e098c30adce12a577d05f3 (patch) | |
tree | bb8c350df779420c2801426bb18fca24961aeb73 /test/SemaTemplate | |
parent | a82cebf937657a66d2c2dd474a249c84541afdcf (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r-- | test/SemaTemplate/deduction.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp index 5695cab9a2..f98fd9bea0 100644 --- a/test/SemaTemplate/deduction.cpp +++ b/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}} +} |