[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 30 17:19:15 PDT 2024
================
@@ -27,15 +27,15 @@ TEST(StatusTest, Formatv) {
}
TEST(StatusTest, ErrorConstructor) {
- EXPECT_TRUE(Status(llvm::Error::success()).Success());
+ EXPECT_TRUE(Status::FromError(llvm::Error::success()).Success());
- Status eagain(
+ Status eagain = Status::FromError(
llvm::errorCodeToError(std::error_code(EAGAIN, std::generic_category())));
EXPECT_TRUE(eagain.Fail());
EXPECT_EQ(eErrorTypePOSIX, eagain.GetType());
EXPECT_EQ(Status::ValueType(EAGAIN), eagain.GetError());
- Status foo(llvm::make_error<llvm::StringError>(
+ Status foo = Status::FromError(llvm::make_error<llvm::StringError>(
"foo", llvm::inconvertibleErrorCode()));
----------------
medismailben wrote:
```suggestion
Status foo = Status::FromError(createStringError("foo"));
```
https://github.com/llvm/llvm-project/pull/106774
More information about the lldb-commits
mailing list