[compiler-rt] [TSan] Fix asan_mac.cpp function pointer cast warnings (PR #151517)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 06:20:38 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 HEAD~1 HEAD --extensions cpp -- compiler-rt/lib/asan/asan_mac.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/asan/asan_mac.cpp b/compiler-rt/lib/asan/asan_mac.cpp
index 99fea6de5..b308ad378 100644
--- a/compiler-rt/lib/asan/asan_mac.cpp
+++ b/compiler-rt/lib/asan/asan_mac.cpp
@@ -285,14 +285,14 @@ dispatch_mach_t dispatch_mach_create(const char *label, dispatch_queue_t queue,
dispatch_mach_handler_t handler);
}
-#define GET_ASAN_BLOCK(work) \
- void (^asan_block)(void); \
- int parent_tid = GetCurrentTidOrInvalid(); \
- asan_block = ^(void) { \
+# define GET_ASAN_BLOCK(work) \
+ void (^asan_block)(void); \
+ int parent_tid = GetCurrentTidOrInvalid(); \
+ asan_block = ^(void) { \
GET_STACK_TRACE_THREAD; \
asan_register_worker_thread(parent_tid, &stack); \
- work(); \
- }
+ work(); \
+ }
INTERCEPTOR(void, dispatch_async,
dispatch_queue_t dq, void(^work)(void)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/151517
More information about the llvm-commits
mailing list