[llvm] [nfc] Allow forwarding `Error` returns from `Expected` callers (PR #92208)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 08:48:46 PDT 2024


================
@@ -493,11 +493,12 @@ template <class T> class [[nodiscard]] Expected {
 
 public:
   /// Create an Expected<T> error value from the given Error.
-  Expected(Error Err)
+  Expected(Error &&Err)
       : HasError(true)
 #if LLVM_ENABLE_ABI_BREAKING_CHECKS
         // Expected is unchecked upon construction in Debug builds.
-        , Unchecked(true)
+        ,
----------------
snehasish wrote:

nit: revert this formatting change?

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


More information about the llvm-commits mailing list