[PATCH] D34600: [Error] add expectSuccess()

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 17:01:41 PDT 2017


chandlerc added a comment.

FWIW, I'm happy w/ all of the alternatives (and names) listed by Zach. Not adding a function is always good too.

I will point out that `failOnError` or `assertOnError` would be much more discoverable for me than `cantFail`.

I wonder if there is a better name for `Expected<T>` to give a hint that it consumes the expected and produces the `T`? Maybe `assertAndGet`? `assertOrGet`?


https://reviews.llvm.org/D34600





More information about the llvm-commits mailing list