Improve unexpanded parameter pack diagnostics by using UPPC_Initializer here.

llvm-svn: 142756
This commit is contained in:
Peter Collingbourne 2011-10-23 18:59:33 +00:00
parent e109a2ca59
commit 8953e7c923
1 changed files with 3 additions and 2 deletions

View File

@ -56,9 +56,10 @@ bool MultiInitializer::isTypeDependent() const {
bool MultiInitializer::DiagnoseUnexpandedParameterPack(Sema &SemaRef) const {
if (isInitializerList())
return SemaRef.DiagnoseUnexpandedParameterPack(getInitList());
return SemaRef.DiagnoseUnexpandedParameterPack(getInitList(),
Sema::UPPC_Initializer);
for (iterator I = begin(), E = end(); I != E; ++I) {
if (SemaRef.DiagnoseUnexpandedParameterPack(*I))
if (SemaRef.DiagnoseUnexpandedParameterPack(*I, Sema::UPPC_Initializer))
return true;
}
return false;