[llvm] [BoundsChecking] Add support for runtime handlers (PR #120513)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 16:09:19 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 6f983f88537415952ec528c42f89f1d5b620fe68 0665d11228b4097c4788dd34d496676d9dbd0c3e --extensions cpp -- llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp b/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp
index 10bf674db6..a41cce9f02 100644
--- a/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp
+++ b/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp
@@ -255,8 +255,8 @@ static bool addBoundsChecking(Function &F, TargetLibraryInfo &TLI,
     CallInst *TrapCall = Opts.UseTrap
                              ? InsertTrap(IRB)
                              : InsertCall(IRB, Opts.MayReturn, Opts.Name);
-      // Ideally we would use the SanitizerHandler::OutOfBounds constant
-      TrapCall->addFnAttr(llvm::Attribute::NoMerge);
+    // Ideally we would use the SanitizerHandler::OutOfBounds constant
+    TrapCall->addFnAttr(llvm::Attribute::NoMerge);
 
     TrapCall->setDoesNotThrow();
     TrapCall->setDebugLoc(DebugLoc);

``````````

</details>


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


More information about the llvm-commits mailing list