File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -879,18 +879,15 @@ void CXXRecordDecl::addedMember(Decl *D) {
879
879
Method->getNonObjectParameter (0 )->getType ()->getAs <ReferenceType>();
880
880
if (!ParamTy || ParamTy->getPointeeType ().isConstQualified ())
881
881
data ().HasDeclaredCopyAssignmentWithConstParam = true ;
882
-
883
- if (Method->isUserProvided ())
884
- data ().IsNaturallyTriviallyRelocatable = false ;
885
882
}
886
883
887
884
if (Method->isMoveAssignmentOperator ()) {
888
885
SMKind |= SMF_MoveAssignment;
889
-
890
- if (Method->isUserProvided ())
891
- data ().IsNaturallyTriviallyRelocatable = false ;
892
886
}
893
887
888
+ if (Method->isUserProvided () && (Method->isCopyAssignment () || Method->isMoveAssignment ()))
889
+ data ().IsNaturallyTriviallyRelocatable = false ;
890
+
894
891
// Keep the list of conversion functions up-to-date.
895
892
if (auto *Conversion = dyn_cast<CXXConversionDecl>(D)) {
896
893
// FIXME: We use the 'unsafe' accessor for the access specifier here,
You can’t perform that action at this time.
0 commit comments