================
@@ -1496,7 +1507,8 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::createParallel(
   // Let the caller create the body.
   assert(BodyGenCB && "Expected body generation callback!");
   InsertPointTy CodeGenIP(PRegBodyBB, PRegBodyBB->begin());
-  BodyGenCB(InnerAllocaIP, CodeGenIP);
+  if (Error Err = BodyGenCB(InnerAllocaIP, CodeGenIP))
+    return std::move(Err);
----------------
skatrak wrote:
It looks like it works as expected in this case as well (if it created a copy 
it would be triggering runtime failures). I see `Expected` has an implicit move 
constructor for an `Error` argument, so perhaps that's what's enabling this.

https://github.com/llvm/llvm-project/pull/112533
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to