================
@@ -6174,6 +6183,35 @@ bool Compiler<Emitter>::VisitCallExpr(const CallExpr *E)
{
}
LocalScope<Emitter> CallScope(this, ScopeKind::Call);
+ ArrayRef<const Expr *> Args(E->getArgs(), E->getNumArgs());
+ bool ActivateLHS = false;
+
+ // Emit a special op for trivial copy/move operators.
+ if (isTrivialMemoryOperation(dyn_cast_if_present<CXXMethodDecl>(FuncDecl))) {
+ const Function *Func = getFunction(FuncDecl);
+ if (!Func)
+ return false;
+
+ if (const auto *OCE = dyn_cast<CXXOperatorCallExpr>(E);
+ OCE && OCE->isAssignmentOp()) {
+ const CXXRecordDecl *LHSRecord =
Args[0]->getType()->getAsCXXRecordDecl();
----------------
ojhunt wrote:
does this need to check for a non-defaulted assignment operator?
https://github.com/llvm/llvm-project/pull/222332
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits