Skip to content

Commit 5ac82c9

Browse files
committed
Address review feedback
1 parent af4621f commit 5ac82c9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang/lib/CIR/CodeGen/CIRGenClass.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,16 @@ void CIRGenFunction::emitDelegateCXXConstructorCall(
260260

261261
void CIRGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &args) {
262262
const auto *assignOp = cast<CXXMethodDecl>(curGD.getDecl());
263+
assert(assignOp->isCopyAssignmentOperator() ||
264+
assignOp->isMoveAssignmentOperator());
263265
const Stmt *rootS = assignOp->getBody();
264266
assert(isa<CompoundStmt>(rootS) &&
265267
"Body of an implicit assignment operator should be compound stmt.");
266268
const auto *rootCS = cast<CompoundStmt>(rootS);
267269

268-
// LexicalScope Scope(*this, RootCS->getSourceRange());
269-
// FIXME(cir): add all of the below under a new scope.
270-
271270
assert(!cir::MissingFeatures::incrementProfileCounter());
271+
assert(!cir::MissingFeatures::runCleanupsScope());
272+
272273
// Classic codegen uses a special class to attempt to replace member
273274
// initializers with memcpy. We could possibly defer that to the
274275
// lowering or optimization phases to keep the memory accesses more

0 commit comments

Comments
 (0)