Better diagnostic on deleted constructor when no

initializer name is available.

llvm-svn: 89885
This commit is contained in:
Fariborz Jahanian 2009-11-25 21:53:11 +00:00
parent d0fe8047dd
commit f82ec6dd2f
1 changed files with 5 additions and 2 deletions

View File

@ -3611,10 +3611,13 @@ Sema::PerformInitializationByConstructor(QualType ClassType,
Diag(Loc, diag::err_ovl_deleted_init)
<< Best->Function->isDeleted()
<< InitEntity << Range;
else
else {
const CXXRecordDecl *RD =
cast<CXXRecordDecl>(ClassType->getAs<RecordType>()->getDecl());
Diag(Loc, diag::err_ovl_deleted_init)
<< Best->Function->isDeleted()
<< InitEntity << Range;
<< RD->getDeclName() << Range;
}
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/true);
return 0;
}