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

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 10:23:00 PDT 2017


zturner added a comment.

I think we should minimize use of `report_fatal_error` in library builds.  This seems like a textbook `assert` use case to me.  No different than `assert(foo != nullptr);` The only objection I have to having both a check and an assert method (and it is a minor object, mind you) is YAGNI.

Naming wise, what about `assertOnError()` and/or `failOnError`?  This has slightly more symmetry with the name of the existing `ExitOnError` class .


https://reviews.llvm.org/D34600





More information about the llvm-commits mailing list