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) {
879879 Method->getNonObjectParameter (0 )->getType ()->getAs <ReferenceType>();
880880 if (!ParamTy || ParamTy->getPointeeType ().isConstQualified ())
881881 data ().HasDeclaredCopyAssignmentWithConstParam = true ;
882-
883- if (Method->isUserProvided ())
884- data ().IsNaturallyTriviallyRelocatable = false ;
885882 }
886883
887884 if (Method->isMoveAssignmentOperator ()) {
888885 SMKind |= SMF_MoveAssignment;
889-
890- if (Method->isUserProvided ())
891- data ().IsNaturallyTriviallyRelocatable = false ;
892886 }
893887
888+ if (Method->isUserProvided () && (Method->isCopyAssignment () || Method->isMoveAssignment ()))
889+ data ().IsNaturallyTriviallyRelocatable = false ;
890+
894891 // Keep the list of conversion functions up-to-date.
895892 if (auto *Conversion = dyn_cast<CXXConversionDecl>(D)) {
896893 // FIXME: We use the 'unsafe' accessor for the access specifier here,
You can’t perform that action at this time.
0 commit comments