github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- 
clang/lib/CodeGen/CGCleanup.h clang/lib/CodeGen/CGException.cpp 
clang/lib/CodeGen/CGObjCRuntime.cpp clang/lib/CodeGen/CodeGenFunction.h 
clang/lib/Driver/ToolChains/Clang.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CodeGen/CGObjCRuntime.cpp 
b/clang/lib/CodeGen/CGObjCRuntime.cpp
index aa4622695..4d3bf1c1e 100644
--- a/clang/lib/CodeGen/CGObjCRuntime.cpp
+++ b/clang/lib/CodeGen/CGObjCRuntime.cpp
@@ -157,8 +157,8 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
   CodeGenFunction::FinallyInfo FinallyInfo;
   if (!useFunclets)
     if (const ObjCAtFinallyStmt *Finally = S.getFinallyStmt())
-      FinallyInfo.enter(CGF, Finally->getFinallyBody(),
-                        beginCatchFn, endCatchFn, exceptionRethrowFn);
+      FinallyInfo.enter(CGF, Finally->getFinallyBody(), beginCatchFn,
+                        endCatchFn, exceptionRethrowFn);
   SmallVector<CatchHandler, 8> Handlers;
 
 
@@ -193,9 +193,9 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
 
   if (useFunclets) {
     if (const ObjCAtFinallyStmt *Finally = S.getFinallyStmt()) {
-        if (hasWasmExceptions) {
-          CGF.ErrorUnsupported(Finally, "@finally for WASM");
-        }
+      if (hasWasmExceptions) {
+        CGF.ErrorUnsupported(Finally, "@finally for WASM");
+      }
 
         CodeGenFunction HelperCGF(CGM, /*suppressNewContext=*/true);
         if (!CGF.CurSEHParent)
@@ -217,12 +217,11 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
     }
   }
 
-
   // Emit the try body.
   CGF.EmitStmt(S.getTryBody());
 
   // Leave the try.
-  llvm::BasicBlock* dispatchBlock{};
+  llvm::BasicBlock *dispatchBlock{};
   if (S.getNumCatchStmts())
     dispatchBlock = CGF.popCatchScope();
 
@@ -234,14 +233,15 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
   // each catch handler.
   SaveAndRestore RestoreCurrentFuncletPad(CGF.CurrentFuncletPad);
   llvm::BasicBlock *WasmCatchStartBlock = nullptr;
-  llvm::CatchPadInst* CatchPadInst{};
+  llvm::CatchPadInst *CatchPadInst{};
   if (!!dispatchBlock && hasWasmExceptions) {
     auto *CatchSwitch =
         cast<llvm::CatchSwitchInst>(dispatchBlock->getFirstNonPHIIt());
     WasmCatchStartBlock = CatchSwitch->hasUnwindDest()
                               ? CatchSwitch->getSuccessor(1)
                               : CatchSwitch->getSuccessor(0);
-    CatchPadInst = 
cast<llvm::CatchPadInst>(WasmCatchStartBlock->getFirstNonPHIIt());
+    CatchPadInst =
+        cast<llvm::CatchPadInst>(WasmCatchStartBlock->getFirstNonPHIIt());
     CGF.CurrentFuncletPad = CatchPadInst;
   }
 
@@ -258,9 +258,11 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
       llvm::BasicBlock::iterator CPICandidate =
           Handler.Block->getFirstNonPHIIt();
       if (CPICandidate != Handler.Block->end()) {
-        if ((CatchPadInst = 
dyn_cast_or_null<llvm::CatchPadInst>(CPICandidate))) {
+        if ((CatchPadInst =
+                 dyn_cast_or_null<llvm::CatchPadInst>(CPICandidate))) {
           CGF.CurrentFuncletPad = CatchPadInst;
-          CatchPadInst->setOperand(2, 
CGF.getExceptionSlot().emitRawPointer(CGF));
+          CatchPadInst->setOperand(2,
+                                   CGF.getExceptionSlot().emitRawPointer(CGF));
         }
       }
     }
@@ -318,7 +320,7 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
     assert(RethrowBlock != WasmCatchStartBlock && RethrowBlock->empty());
     CGF.Builder.SetInsertPoint(RethrowBlock);
     llvm::Function *RethrowInCatchFn =
-      CGM.getIntrinsic(llvm::Intrinsic::wasm_rethrow);
+        CGM.getIntrinsic(llvm::Intrinsic::wasm_rethrow);
     CGF.EmitNoreturnRuntimeCallOrInvoke(RethrowInCatchFn, {});
   }
 
diff --git a/clang/lib/CodeGen/CodeGenFunction.h 
b/clang/lib/CodeGen/CodeGenFunction.h
index 86c02f0ac..b284f58bc 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -1307,7 +1307,7 @@ public:
   /// popCatchScope - Pops the catch scope at the top of the EHScope
   /// stack, emitting any required code (other than the catch handlers
   /// themselves).
-  llvm::BasicBlock* popCatchScope();
+  llvm::BasicBlock *popCatchScope();
 
   llvm::BasicBlock *getEHResumeBlock(bool isCleanup);
   llvm::BasicBlock *getEHDispatchBlock(EHScopeStack::stable_iterator scope);

``````````

</details>


https://github.com/llvm/llvm-project/pull/171038
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to