summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-06-13 00:45:47 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-06-13 00:45:47 +0000
commit2c308503ea8b726369dc7cb475cea7a306dc7b7e (patch)
treeea023b4e2d4d3810fb3aa2eee165f2445d2792df /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parent8338716e8d4e024ab9bd0732505364bb801d13c4 (diff)
downloadbcm5719-llvm-2c308503ea8b726369dc7cb475cea7a306dc7b7e.tar.gz
bcm5719-llvm-2c308503ea8b726369dc7cb475cea7a306dc7b7e.zip
Include the unexpanded packs in the initializer expression when checking a
pack expanded constructor initializer list. Fixes PR16303! llvm-svn: 183878
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 030b9c72c1c..c947bcc9f2a 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -3165,8 +3165,9 @@ Sema::InstantiateMemInitializers(CXXConstructorDecl *New,
if (Init->isPackExpansion()) {
// This is a pack expansion. We should expand it now.
TypeLoc BaseTL = Init->getTypeSourceInfo()->getTypeLoc();
- SmallVector<UnexpandedParameterPack, 2> Unexpanded;
+ SmallVector<UnexpandedParameterPack, 4> Unexpanded;
collectUnexpandedParameterPacks(BaseTL, Unexpanded);
+ collectUnexpandedParameterPacks(Init->getInit(), Unexpanded);
bool ShouldExpand = false;
bool RetainExpansion = false;
Optional<unsigned> NumExpansions;
OpenPOWER on IntegriCloud