diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-11-12 01:43:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-11-12 01:43:45 +0000 |
commit | b6ff5628bec83cb58cdb9724584eeaf0a51fe81b (patch) | |
tree | 333cf0c3c3710afb4cd732efb3dc729dc572da06 /lib/Sema/SemaTemplate.cpp | |
parent | affaed529a7098a02845b9373b4fba58619957b1 (diff) |
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/trunk@221748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 1bddfe2184..50a4298333 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -3749,7 +3749,7 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template, } // Push the argument pack onto the list of converted arguments. - if (InFinalParameterPack) { + if (InFinalParameterPack && !ArgumentPack.empty()) { Converted.push_back( TemplateArgument::CreatePackCopy(Context, ArgumentPack.data(), |