[compiler-rt] [compiler-rt][rtsan] Fix madvise/posix_madvise for macOs. (PR #124020)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 14:24:34 PST 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 517334bdb83deaae3be6fbc4fa5f1d721b01c0f0 8cbdaeb7af46c4388d88c62b824d106d27eaedf8 --extensions cpp -- compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
index b6243e8247..23b1728c7a 100644
--- a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
+++ b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
@@ -246,7 +246,9 @@ TEST_F(RtsanOpenedMmapTest, MadviseDiesWhenRealtime) {
 }
 
 TEST_F(RtsanOpenedMmapTest, PosixMadviseDiesWhenRealtime) {
-  auto Func = [this]() { posix_madvise(GetAddr(), GetSize(), POSIX_MADV_NORMAL); };
+  auto Func = [this]() {
+    posix_madvise(GetAddr(), GetSize(), POSIX_MADV_NORMAL);
+  };
   ExpectRealtimeDeath(Func, "posix_madvise");
   ExpectNonRealtimeSurvival(Func);
 }

``````````

</details>


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


More information about the llvm-commits mailing list