[cfe-commits] r153897 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp test/CXX/special/class.copy/implicit-move.cpp
Richard Smith
richard-llvm at metafoo.co.uk
Mon Apr 2 14:07:48 PDT 2012
Author: rsmith
Date: Mon Apr 2 16:07:48 2012
New Revision: 153897
URL: http://llvm.org/viewvc/llvm-project?rev=153897&view=rev
Log:
PR10217 diagnostic fix: don't say 'copy constructor' when we mean
'copy assignment operator'.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/test/CXX/special/class.copy/implicit-move.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=153897&r1=153896&r2=153897&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Apr 2 16:07:48 2012
@@ -4668,7 +4668,7 @@
if (UserDeclaredMove) {
Diag(UserDeclaredMove->getLocation(),
diag::note_deleted_copy_user_declared_move)
- << (CSM == CXXMoveAssignment) << RD
+ << (CSM == CXXCopyAssignment) << RD
<< UserDeclaredMove->isMoveAssignmentOperator();
return true;
}
Modified: cfe/trunk/test/CXX/special/class.copy/implicit-move.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.copy/implicit-move.cpp?rev=153897&r1=153896&r2=153897&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.copy/implicit-move.cpp (original)
+++ cfe/trunk/test/CXX/special/class.copy/implicit-move.cpp Mon Apr 2 16:07:48 2012
@@ -28,7 +28,7 @@
struct HasMoveConstructor {
ThrowingCopy tc;
HasMoveConstructor() noexcept;
- HasMoveConstructor(HasMoveConstructor &&) noexcept; // expected-note {{deleted because 'HasMoveConstructor' has a user-declared move constructor}}
+ HasMoveConstructor(HasMoveConstructor &&) noexcept; // expected-note {{copy assignment operator is implicitly deleted because 'HasMoveConstructor' has a user-declared move constructor}}
};
struct HasMoveAssignment { // expected-note {{implicit copy constructor}}
More information about the cfe-commits
mailing list