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
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index ce0132e..6384e53 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -4126,6 +4126,12 @@
   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;