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 cpp,h --
clang/lib/CodeGen/CGException.cpp clang/lib/CodeGen/CGObjCGNU.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/CGException.cpp
b/clang/lib/CodeGen/CGException.cpp
index a46ca48a8..3b7c60d7d 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -1217,8 +1217,8 @@ llvm::BasicBlock *CodeGenFunction::popCatchScope() {
return dispatchBlock;
}
-
-void CodeGenFunction::WasmEmitFallthroughRethrow(llvm::BasicBlock
*WasmCatchStartBlock) {
+void CodeGenFunction::WasmEmitFallthroughRethrow(
+ llvm::BasicBlock *WasmCatchStartBlock) {
assert(WasmCatchStartBlock);
// Navigate for the "rethrow" block. For CXX exceptions this was created in
// emitWasmCatchPadBlock(). Wasm uses landingpad-style conditional branches
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 6a3ceb7d1..fd47d06b5 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -2373,8 +2373,9 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned
runtimeABIVersion,
msgSendMDKind = VMContext.getMDKindID("GNUObjCMessageSend");
auto Triple = cgm.getContext().getTargetInfo().getTriple();
usesSEHExceptions = Triple.isWindowsMSVCEnvironment();
- usesCxxExceptions = (Triple.isOSCygMing() &&
- isRuntime(ObjCRuntime::GNUstep, 2)) || Triple.isWasm();
+ usesCxxExceptions =
+ (Triple.isOSCygMing() && isRuntime(ObjCRuntime::GNUstep, 2)) ||
+ Triple.isWasm();
CodeGenTypes &Types = CGM.getTypes();
IntTy = cast<llvm::IntegerType>(
diff --git a/clang/lib/CodeGen/CGObjCRuntime.cpp
b/clang/lib/CodeGen/CGObjCRuntime.cpp
index 76d7a8065..12ca51dbb 100644
--- a/clang/lib/CodeGen/CGObjCRuntime.cpp
+++ b/clang/lib/CodeGen/CGObjCRuntime.cpp
@@ -234,8 +234,8 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
// } @catch(id a) {
// } @catch(id b) {
// [...]
- //
- // With funclet-based exception handling, the dispatch block is created in
+ //
+ // With funclet-based exception handling, the dispatch block is created in
// getEHDispatchBlock() <- getInvokeDestImpl() <- EmitCall().
// The following IR is emitted in this case:
// On aarch64-linux-gnu (landing-pad based)
@@ -248,13 +248,13 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
// Leave the try.
llvm::BasicBlock *DispatchBlock = nullptr;
if (S.getNumCatchStmts()) {
- // The dispatch block that was created during the emission of the try
block
- // was cached. We retrieve it when popping the current catch scope.
- DispatchBlock = CGF.popCatchScope();
+ // The dispatch block that was created during the emission of the try block
+ // was cached. We retrieve it when popping the current catch scope.
+ DispatchBlock = CGF.popCatchScope();
}
// On Windows and WASM, the new exception handling instructions are used.
- //
+ //
// Continuing with the previous example, on Windows, we emit one catchpad for
// every catch handler. This is not the case for WASM where all catch
handlers
// merged into one big catchpad:
@@ -276,8 +276,7 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
WasmCatchStartBlock = CatchSwitch->hasUnwindDest()
? CatchSwitch->getSuccessor(1)
: CatchSwitch->getSuccessor(0);
- CPI =
- cast<llvm::CatchPadInst>(WasmCatchStartBlock->getFirstNonPHIIt());
+ CPI = cast<llvm::CatchPadInst>(WasmCatchStartBlock->getFirstNonPHIIt());
CGF.CurrentFuncletPad = CPI;
}
diff --git a/clang/lib/CodeGen/CodeGenFunction.h
b/clang/lib/CodeGen/CodeGenFunction.h
index ab482583a..9502f4cd3 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -1313,7 +1313,7 @@ public:
llvm::BasicBlock *popCatchScope();
// This function should be called after emitting all catch clauses and none
- // of them were 'catch-all' clauses.
+ // of them were 'catch-all' clauses.
// Because in wasm we merge all catch clauses into one big catchpad, in case
// none of the types in catch handlers matches after we test against each of
// them, we should unwind to the next EH enclosing scope. We generate a call
``````````
</details>
https://github.com/llvm/llvm-project/pull/183753
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits