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 | e3895eb050152f77a3ad7023cee5b0b070e52e7b (patch) | |
| tree | 5fe7575ec0bc5a829abe1a9aa556975074a75e6d /clang/lib/Sema | |
| parent | bc7dd9ea027a6c33004a56dad1423112ed6a9463 (diff) | |
| download | bcm5719-llvm-e3895eb050152f77a3ad7023cee5b0b070e52e7b.tar.gz bcm5719-llvm-e3895eb050152f77a3ad7023cee5b0b070e52e7b.zip | |
Use the location of the copy assignment when diagnosing classes that are nontrivial because of it.
llvm-svn: 160962
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 81b94a4ecdd..6dfd796f40b 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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; |

