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

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 10:18:20 PDT 2017


chandlerc added a comment.

I would suggest "check" instead of "expect" to make it more clear that this will assert.

Also, why assert? I don't really expect (ba-dum) Expected<T> and this part of the error handling APIs to happen in hot paths; would it be better to *always* report_fatal_error?

Would it be better to allow either with different names? `checkSuccess` for always checking, `assertSuccess` for debug-only checking?


https://reviews.llvm.org/D34600





More information about the llvm-commits mailing list