diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-12-08 23:38:45 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-12-08 23:38:45 +0000 |
commit | b3cde23af4e18e713453781fd94f1b59be62dc08 (patch) | |
tree | df521f54e3873e4060674fda423e1e39bdb132f8 /test/SemaTemplate/deduction.cpp | |
parent | c6a42d38f7079251765c553508e20f5d13d5a7c9 (diff) |
Merging r221748:
------------------------------------------------------------------------
r221748 | richard-llvm | 2014-11-11 20:43:45 -0500 (Tue, 11 Nov 2014) | 4 lines
PR21536: Fix a corner case where we'd get confused by a pack expanding into the
penultimate parameter of a template parameter list, where the last parameter is
itself a pack, and build a bogus empty final pack argument.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r-- | test/SemaTemplate/deduction.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp index aecb5ee7c8..c089573a9c 100644 --- a/test/SemaTemplate/deduction.cpp +++ b/test/SemaTemplate/deduction.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 // Template argument deduction with template template parameters. template<typename T, template<T> class A> @@ -162,3 +162,19 @@ namespace test14 { foo(a); } } + +namespace PR21536 { + template<typename ...T> struct X; + template<typename A, typename ...B> struct S { + static_assert(sizeof...(B) == 1, ""); + void f() { + using T = A; + using T = int; + + using U = X<B...>; + using U = X<int>; + } + }; + template<typename ...T> void f(S<T...>); + void g() { f(S<int, int>()); } +} |