[Lldb-commits] [lldb] [lldb] Store expression evaluator diagnostics in an llvm::Error (NFC) (PR #106442)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 24 16:22: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(llvm::createStringError("foo"));
```

https://github.com/llvm/llvm-project/pull/106442


More information about the lldb-commits mailing list