[compiler-rt] [asan][Darwin] Use Apples blocks extension only when supported (#72639) (PR #72642)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 04:23:34 PST 2023


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 ec42d547eba5c0ad0bddbecc8902d35383968e78 4c03cd3fa7dbeca64002372596f4cffdfa50ecdb -- 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 6252fa20d5..1b0e9b3fe0 100644
--- a/compiler-rt/lib/asan/asan_mac.cpp
+++ b/compiler-rt/lib/asan/asan_mac.cpp
@@ -139,11 +139,11 @@ typedef void (*dispatch_mach_handler_function_t)(void *context,
                                                  dispatch_mach_reason reason,
                                                  dispatch_mach_msg_t message,
                                                  mach_error_t error);
-#if !defined(MISSING_BLOCKS_SUPPORT)
+#  if !defined(MISSING_BLOCKS_SUPPORT)
 typedef void (^dispatch_mach_handler_t)(dispatch_mach_reason reason,
                                         dispatch_mach_msg_t message,
                                         mach_error_t error);
-#endif
+#  endif
 
 // A wrapper for the ObjC blocks used to support libdispatch.
 typedef struct {

``````````

</details>


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


More information about the llvm-commits mailing list