[libc-commits] [libc] [libc] Add noexcept to aligned_alloc declaration in full-build mode (PR #191236)

via libc-commits libc-commits at lists.llvm.org
Thu Apr 30 06:18:56 PDT 2026


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 origin/main HEAD --extensions h -- libc/hdr/func/aligned_alloc.h libc/hdr/func/free.h libc/hdr/func/malloc.h libc/hdr/func/realloc.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/libc/hdr/func/aligned_alloc.h b/libc/hdr/func/aligned_alloc.h
index b0aafa29f..6a877cece 100644
--- a/libc/hdr/func/aligned_alloc.h
+++ b/libc/hdr/func/aligned_alloc.h
@@ -11,8 +11,8 @@
 
 #ifdef LIBC_FULL_BUILD
 
-#include "include/__llvm-libc-common.h"
 #include "hdr/types/size_t.h"
+#include "include/__llvm-libc-common.h"
 
 __BEGIN_C_DECLS
 void *aligned_alloc(size_t, size_t) __NOEXCEPT;
diff --git a/libc/hdr/func/malloc.h b/libc/hdr/func/malloc.h
index d3fab8461..49c349f24 100644
--- a/libc/hdr/func/malloc.h
+++ b/libc/hdr/func/malloc.h
@@ -11,8 +11,8 @@
 
 #ifdef LIBC_FULL_BUILD
 
-#include "include/__llvm-libc-common.h"
 #include "hdr/types/size_t.h"
+#include "include/__llvm-libc-common.h"
 
 __BEGIN_C_DECLS
 void *malloc(size_t) __NOEXCEPT;
diff --git a/libc/hdr/func/realloc.h b/libc/hdr/func/realloc.h
index 129a111e2..1712a73a3 100644
--- a/libc/hdr/func/realloc.h
+++ b/libc/hdr/func/realloc.h
@@ -11,8 +11,8 @@
 
 #ifdef LIBC_FULL_BUILD
 
-#include "include/__llvm-libc-common.h"
 #include "hdr/types/size_t.h"
+#include "include/__llvm-libc-common.h"
 
 __BEGIN_C_DECLS
 void *realloc(void *ptr, size_t new_size) __NOEXCEPT;

``````````

</details>


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


More information about the libc-commits mailing list