aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-03 20:35:03 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-03 20:35:03 +0000
commit925910d488051cbd4e38f350c1e9d69c473f09a0 (patch)
treeef5ad452c4a8201a08ec238cb8e65b36cb0f4ec2 /lib/Sema/SemaTemplate.cpp
parentaf4bad23013532f4c94cdc27887623f45e6f7020 (diff)
Diagnose the presence of unexpanded parameter packs within class
template partial specialization arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index ce0132ee81..6384e53e80 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -4126,6 +4126,12 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec,
TemplateArgs.setRAngleLoc(RAngleLoc);
translateTemplateArguments(TemplateArgsIn, TemplateArgs);
+ // Check for unexpanded parameter packs in any of the template arguments.
+ for (unsigned I = 0, N = TemplateArgs.size(); I != N; ++I)
+ if (DiagnoseUnexpandedParameterPack(TemplateArgs[I],
+ UPPC_PartialSpecialization))
+ return true;
+
// Check that the template argument list is well-formed for this
// template.
llvm::SmallVector<TemplateArgument, 4> Converted;