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 @@ -921,18 +921,15 @@ void CXXRecordDecl::addedMember(Decl *D) {
921921 Method->getNonObjectParameter (0 )->getType ()->getAs <ReferenceType>();
922922 if (!ParamTy || ParamTy->getPointeeType ().isConstQualified ())
923923 data ().HasDeclaredCopyAssignmentWithConstParam = true ;
924-
925- if (Method->isUserProvided ())
926- data ().IsNaturallyTriviallyRelocatable = false ;
927924 }
928925
929926 if (Method->isMoveAssignmentOperator ()) {
930927 SMKind |= SMF_MoveAssignment;
931-
932- if (Method->isUserProvided ())
933- data ().IsNaturallyTriviallyRelocatable = false ;
934928 }
935929
930+ if (Method->isUserProvided () && (Method->isCopyAssignment () || Method->isMoveAssignment ()))
931+ data ().IsNaturallyTriviallyRelocatable = false ;
932+
936933 // Keep the list of conversion functions up-to-date.
937934 if (auto *Conversion = dyn_cast<CXXConversionDecl>(D)) {
938935 // FIXME: We use the 'unsafe' accessor for the access specifier here,
You can’t perform that action at this time.
0 commit comments