[clang] [llvm] [mlir] [OpenMP][OMPIRBuilder] Error propagation across callbacks (PR #112533)

Pranav Bhandarkar via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 21 21:38:57 PDT 2024


================
@@ -2331,8 +2332,10 @@ void CGOpenMPRuntime::emitBarrierCall(CodeGenFunction &CGF, SourceLocation Loc,
   auto *OMPRegionInfo =
       dyn_cast_or_null<CGOpenMPRegionInfo>(CGF.CapturedStmtInfo);
   if (CGF.CGM.getLangOpts().OpenMPIRBuilder) {
-    CGF.Builder.restoreIP(OMPBuilder.createBarrier(
-        CGF.Builder, Kind, ForceSimpleCall, EmitChecks));
+    auto Result = OMPBuilder.createBarrier(CGF.Builder, Kind, ForceSimpleCall,
----------------
bhandarkar-pranav wrote:

_nit#1_: I have been receiving feedback on some of my PRs to be a little more conservative with the use of `auto`. I have concluded that it is best to use it only when it is obvious from the RHS of the assignment (e.g `dyn_cast<SomeType>`. [(Relevant part of the style guide)](https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable)

https://github.com/llvm/llvm-project/pull/112533


More information about the cfe-commits mailing list