================ @@ -235,10 +235,9 @@ class OpenMPIRBuilderTest : public testing::Test { return Error::success(); }; - Expected<CanonicalLoopInfo *> LoopResult = - OMPBuilder.createCanonicalLoop(Loc, LoopBodyGenCB, CastedTripCount); - assert(LoopResult && "unexpected error"); - CanonicalLoopInfo *Loop = *LoopResult; + + CanonicalLoopInfo *Loop = *expectedToOptional( ---------------- Meinersbur wrote:
Derefencting a `std::nullopt` is undefined behaviour, so potentially the same as `cantFail`. The comment of `expectedToOptional` indicated that it is discurraged to use it. https://github.com/llvm/llvm-project/pull/115863 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits