aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-13 18:47:47 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-13 18:47:47 +0000
commitc421f546e63b2f85caa1ca0d94d508f99bb871cb (patch)
tree59087bbe8a20604d7052f5b89445f1e78b8d7978 /lib/Sema/SemaTemplate.cpp
parentdce73976163207916d5e6eb9529090ea7f70219e (diff)
Only apply the parameter pack matching of C++0x [temp.arg.template]p3
when we're actually matching a template template argument to a template template parameter. Otherwise, use strict matching. Fixes <rdar://problem/8859985> clang++: variadics and out-of-line definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 08384ccef5..868458c2a9 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -3801,7 +3801,8 @@ Sema::TemplateParameterListsAreEqual(TemplateParameterList *New,
for (TemplateParameterList::iterator OldParm = Old->begin(),
OldParmEnd = Old->end();
OldParm != OldParmEnd; ++OldParm) {
- if (!(*OldParm)->isTemplateParameterPack()) {
+ if (Kind != TPL_TemplateTemplateArgumentMatch ||
+ !(*OldParm)->isTemplateParameterPack()) {
if (NewParm == NewParmEnd) {
if (Complain)
DiagnoseTemplateParameterListArityMismatch(*this, New, Old, Kind,