[PATCH] D21601: Make tooling::applyAllReplacements return llvm::Expected<string> instead of empty string to indicate potential error.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 24 09:01:13 PDT 2016


Would EXPECTED_FALSE(!Code) be better?

On Fri, Jun 24, 2016, 17:42 Manuel Klimek <klimek at google.com> wrote:

> klimek added inline comments.
>
> ================
> Comment at: unittests/Format/CleanupTest.cpp:258
> @@ +257,3 @@
> +    auto CleanReplaces = cleanupAroundReplacements(Code, Replaces, Style);
> +    EXPECT_TRUE((bool)CleanReplaces)
> +        << llvm::toString(CleanReplaces.takeError()) << "\n";
> ----------------
> Hm. Can we make it work with EXPECT_TRUE somehow?
>
>
> http://reviews.llvm.org/D21601
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160624/8bbb41a4/attachment.html>


More information about the cfe-commits mailing list