diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-07-30 16:41:40 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-07-30 16:41:40 +0000 |
commit | e5e8f4d2db48ec21f537fd6452276c1fe26bc726 (patch) | |
tree | 0eb005d08b5600bb354c9e5280813c2a5265974e /lib/Sema/SemaDecl.cpp | |
parent | 2cd7f41f4eb2b02568664132253f8e1d9cf381dd (diff) |
Use the location of the copy assignment when diagnosing classes that are nontrivial because of it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 81b94a4ecd..6dfd796f40 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -9513,10 +9513,9 @@ void Sema::DiagnoseNontrivial(const RecordType* T, CXXSpecialMember member) { case CXXCopyAssignment: if (RD->hasUserDeclaredCopyAssignment()) { - // FIXME: this should use the location of the copy - // assignment, not the type. - SourceLocation TyLoc = RD->getLocStart(); - Diag(TyLoc, diag::note_nontrivial_user_defined) << QT << member; + SourceLocation AssignLoc = + RD->getCopyAssignmentOperator(0)->getLocation(); + Diag(AssignLoc, diag::note_nontrivial_user_defined) << QT << member; return; } break; |