diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 60a99367532e..3b8209f06406 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -1516,7 +1516,7 @@ namespace { llvm::Value *LoadThisForDtorDelete(CodeGenFunction &CGF, const CXXDestructorDecl *DD) { if (Expr *ThisArg = DD->getOperatorDeleteThisArg()) - return CGF.EmitScalarExpr(DD->getOperatorDeleteThisArg()); + return CGF.EmitScalarExpr(ThisArg); return CGF.LoadCXXThis(); }