summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-07-30 16:41:40 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-07-30 16:41:40 +0000
commite3895eb050152f77a3ad7023cee5b0b070e52e7b (patch)
tree5fe7575ec0bc5a829abe1a9aa556975074a75e6d /clang/lib/Sema
parentbc7dd9ea027a6c33004a56dad1423112ed6a9463 (diff)
downloadbcm5719-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.cpp7
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;
OpenPOWER on IntegriCloud