[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 13:50:57 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 2e6402ca2c6c33ccf41d74383a8e3afb82489410 8415be6e59aa2f8a23a3e484b1c8053f4d0c7206 --extensions h -- clang/lib/Headers/mm_malloc.h
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Headers/mm_malloc.h b/clang/lib/Headers/mm_malloc.h
index addb598f62..93c98bae27 100644
--- a/clang/lib/Headers/mm_malloc.h
+++ b/clang/lib/Headers/mm_malloc.h
@@ -13,11 +13,11 @@
 #include <stdlib.h>
 
 #ifdef _WIN32
-# if defined(__MINGW32__)
-#   include <malloc.h>
-# else
-#   include <corecrt_malloc.h>
-# endif
+#if defined(__MINGW32__)
+#include <malloc.h>
+#else
+#include <corecrt_malloc.h>
+#endif
 #else
 #ifndef __cplusplus
 extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);

``````````

</details>


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


More information about the cfe-commits mailing list