diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-28 12:23:24 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-28 12:23:24 +0000 |
commit | 0f46e64947bdd570a499732c4b459961627d8745 (patch) | |
tree | 3cab61f88d17f0b2df4dbedb3eb18b694d88cd12 /lib/Sema/SemaOverload.cpp | |
parent | e8c0322701ce6ece0c24ab1391915676dd2eba1c (diff) |
Improve diagnostic wording for when an implicitly-deleted special member
function is selected by overload resolution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171190 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index e5af2b16d7..7ae6d9d5af 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -10386,16 +10386,13 @@ Sema::CreateOverloadedBinOp(SourceLocation OpLoc, if (isImplicitlyDeleted(Best->Function)) { CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); Diag(OpLoc, diag::err_ovl_deleted_special_oper) - << getSpecialMember(Method) - << BinaryOperator::getOpcodeStr(Opc) - << getDeletedOrUnavailableSuffix(Best->Function); + << Context.getRecordType(Method->getParent()) + << getSpecialMember(Method); - if (getSpecialMember(Method) != CXXInvalid) { - // The user probably meant to call this special member. Just - // explain why it's deleted. - NoteDeletedFunction(Method); - return ExprError(); - } + // The user probably meant to call this special member. Just + // explain why it's deleted. + NoteDeletedFunction(Method); + return ExprError(); } else { Diag(OpLoc, diag::err_ovl_deleted_oper) << Best->Function->isDeleted() |