[llvm] [ASan] Move early exit checks outside "instrumentFunction()" to avoid… (PR #133285)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 27 10:49:51 PDT 2025
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 f612d705252dbf16265649ae5155d51b4c569182 9c3b3ecd902e24355c4f84ffa6c86aa1be9933ab --extensions cpp -- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 0284e78577..62bfb7cec4 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -1314,9 +1314,12 @@ PreservedAnalyses AddressSanitizerPass::run(Module &M,
for (Function &F : M) {
if (F.empty())
continue;
- if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage) continue;
- if (!ClDebugFunc.empty() && ClDebugFunc == F.getName()) continue;
- if (F.getName().starts_with("__asan_")) continue;
+ if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage)
+ continue;
+ if (!ClDebugFunc.empty() && ClDebugFunc == F.getName())
+ continue;
+ if (F.getName().starts_with("__asan_"))
+ continue;
if (F.isPresplitCoroutine())
continue;
AddressSanitizer FunctionSanitizer(
``````````
</details>
https://github.com/llvm/llvm-project/pull/133285
More information about the llvm-commits
mailing list