[compiler-rt] [compiler-rt] freadlink fix 2 for #83679. (PR #110372)

via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 09:08:00 PDT 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 5d734fa4c8f358299a4dfd2a7f9315a226b94a4a 21c522b6e3322b5a066f7ff6846c03b6c690f8e7 --extensions h -- compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 09f7cac29f..c33c49b13b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -606,12 +606,14 @@
 // FIXME: also available from musl 1.2.5
 #define SANITIZER_INTERCEPT_PREADV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
 #define SANITIZER_INTERCEPT_PWRITEV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
-#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000
-#  define SI_MAC_OS_DEPLOYMENT_MIN_13_00 1
-#else
-#  define SI_MAC_OS_DEPLOYMENT_MIN_13_00 0
-#endif
-#define SANITIZER_INTERCEPT_FREADLINK (SI_MAC && SI_MAC_OS_DEPLOYMENT_MIN_13_00)
+#  if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
+      __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000
+#    define SI_MAC_OS_DEPLOYMENT_MIN_13_00 1
+#  else
+#    define SI_MAC_OS_DEPLOYMENT_MIN_13_00 0
+#  endif
+#  define SANITIZER_INTERCEPT_FREADLINK \
+    (SI_MAC && SI_MAC_OS_DEPLOYMENT_MIN_13_00)
 #else
 #
 
@@ -632,8 +634,8 @@
 // This "feature" is useful for downstream users who do not want some of
 // their libc funtions to be intercepted. They can selectively disable
 // interception of those functions.
-#ifdef SANITIZER_OVERRIDE_INTERCEPTORS
-#include <sanitizer_intercept_overriders.h>
-#endif
+#  ifdef SANITIZER_OVERRIDE_INTERCEPTORS
+#    include <sanitizer_intercept_overriders.h>
+#  endif
 
 #endif  // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H

``````````

</details>


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


More information about the llvm-commits mailing list