ymandel marked 4 inline comments as done.
ymandel added inline comments.

================
Comment at: clang/lib/Tooling/Refactoring/Transformer.cpp:164
       return SmallVector<Transformation, 0>();
-    T.Replacement = Edit.Replacement(Result);
+    auto ReplacementOrErr = Edit.Replacement(Result);
+    if (auto Err = ReplacementOrErr.takeError())
----------------
ilya-biryukov wrote:
> Maybe follow a typical pattern for handling errors here (to avoid  `OrErr` 
> suffixes and an extra `Err` variable)? I.e.
> ```
> auto Replacement = Edit.Replacement(Result);
> if (!Replacement)
>   return Replacement.takeError();
> T.Replacement = std::move(*Replacement);
> ```
> 
Here and elsewhere.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61015/new/

https://reviews.llvm.org/D61015



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to