[clang] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 25 16:43:32 PST 2024


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 fe3c23b439b9a2d00442d9bc6a4ca86f73066a3d f24a87de48c42f310ee73ecf480ea2dcf631881f --extensions cpp,c -- clang/test/CodeGen/ubsan-trap-merge.c clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGen/bounds-checking.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index f8c1e1cd7a..74e185c30c 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -3919,9 +3919,9 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
     Builder.CreateCondBr(Checked, Cont, TrapBB);
     EmitBlock(TrapBB);
 
-    llvm::CallInst *TrapCall = Builder.CreateCall(
-        CGM.getIntrinsic(llvm::Intrinsic::ubsantrap),
-        llvm::ConstantInt::get(CGM.Int8Ty, CheckHandlerID));
+    llvm::CallInst *TrapCall =
+        Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::ubsantrap),
+                           llvm::ConstantInt::get(CGM.Int8Ty, CheckHandlerID));
 
     if (!CGM.getCodeGenOpts().TrapFuncName.empty()) {
       auto A = llvm::Attribute::get(getLLVMContext(), "trap-func-name",

``````````

</details>


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


More information about the cfe-commits mailing list