[lldb] Make deep copies of Status explicit (NFC) (#107170)

This commit is contained in:
Adrian Prantl
2024-09-05 12:44:13 -07:00
committed by GitHub
parent 53d5ffea6b
commit b798f4bd50
57 changed files with 172 additions and 141 deletions

View File

@@ -1369,7 +1369,7 @@ SBTarget::WatchpointCreateByAddress(lldb::addr_t addr, size_t size,
CompilerType *type = nullptr;
watchpoint_sp =
target_sp->CreateWatchpoint(addr, size, type, watch_type, cw_error);
error.SetError(cw_error);
error.SetError(std::move(cw_error));
sb_watchpoint.SetSP(watchpoint_sp);
}
@@ -2326,7 +2326,8 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
Status error;
error = Status::FromErrorString("can't evaluate expressions when the "
"process is running.");
expr_value_sp = ValueObjectConstResult::Create(nullptr, error);
expr_value_sp =
ValueObjectConstResult::Create(nullptr, std::move(error));
}
} else {
target->EvaluateExpression(expr, frame, expr_value_sp, options.ref());