================
@@ -345,18 +344,15 @@ TEST_F(OpenMPIRBuilderTest, CreateBarrier) {
IRBuilder<> Builder(BB);
- OpenMPIRBuilder::InsertPointOrErrorTy BarrierIP1 =
- OMPBuilder.createBarrier({IRBuilder<>::InsertPoint()}, OMPD_for);
- assert(BarrierIP1 && "unexpected error");
+ ASSERT_TRUE(expectedToOptional(
+ OMPBuilder.createBarrier({IRBuilder<>::InsertPoint()}, OMPD_for)));
----------------
skatrak wrote:
I made another revision to avoid translating to `std::optional` in order to
discard errors, and instead handle them through some new local macros. I'm not
against adding these functions that you propose, but that doesn't seem like a
good thing to do as part of this PR. Perhaps something that can be added
separately and then potentially update this and other tests to use it.
https://github.com/llvm/llvm-project/pull/115863
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits