================ @@ -258,6 +258,30 @@ void CIRGenFunction::emitDelegateCXXConstructorCall( /*Delegating=*/true, thisAddr, delegateArgs, loc); } +void CIRGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &args) { + const auto *assignOp = cast<CXXMethodDecl>(curGD.getDecl()); + const Stmt *rootS = assignOp->getBody(); + assert(isa<CompoundStmt>(rootS) && + "Body of an implicit assignment operator should be compound stmt."); + const auto *rootCS = cast<CompoundStmt>(rootS); + + // LexicalScope Scope(*this, RootCS->getSourceRange()); + // FIXME(cir): add all of the below under a new scope. ---------------- andykaylor wrote:
I looked into this a bit more, trying to understand what should be happening. Classic codegen does have a `LexicalScope` object in this function, but it also creates one in the object that calls this function, so I'm not sure it's strictly necessary. The similar functions, like `emitConstructorBody` that are called from the same place use `RunCleanupScope` instead and that seems to be related to handling structors in try blocks, which makes me wonder why this function doesn't try handling in classic codegen. For now, I've just added the missing feature as suggested. https://github.com/llvm/llvm-project/pull/145979 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits