[PATCH] D49013: [Support] Allow formatv() to consume llvm::Error by-value without crashing.

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 15:19:30 PDT 2018


lhames added a comment.

Currently the toString operation on Error is consuming. Could this just be:

  errs() << toString(MaybeFoo.takeError());

If the aim is to apply special formatting to errors, my preference would be for Zachery's Method (2) as it makes the path of ownership more explicit.


Repository:
  rL LLVM

https://reviews.llvm.org/D49013





More information about the llvm-commits mailing list