forked from OSchip/llvm-project
Better diagnostic on deleted constructor when no
initializer name is available. llvm-svn: 89885
This commit is contained in:
parent
d0fe8047dd
commit
f82ec6dd2f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue