[libc-commits] [libc] [bazel] add missing header to alloc-checker for bazel clib build (PR #173400)

Kyungtak Woo via libc-commits libc-commits at lists.llvm.org
Tue Dec 23 10:00:15 PST 2025


https://github.com/kevinwkt updated https://github.com/llvm/llvm-project/pull/173400

>From 420a172689f1ad48219299a9cbc608678e8d1f25 Mon Sep 17 00:00:00 2001
From: Kyungtak Woo <kevinwkt1997 at gmail.com>
Date: Tue, 23 Dec 2025 11:27:26 -0600
Subject: [PATCH 1/3] add missing header to alloc-checker for clib guild

---
 libc/src/__support/alloc-checker.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libc/src/__support/alloc-checker.h b/libc/src/__support/alloc-checker.h
index ecef094453cc8..a59f9ee34a0ab 100644
--- a/libc/src/__support/alloc-checker.h
+++ b/libc/src/__support/alloc-checker.h
@@ -14,6 +14,7 @@
 #include "src/__support/common.h"
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/os.h"
+#include "src/__support/CPP/new.h"
 
 namespace LIBC_NAMESPACE_DECL {
 

>From 239f1afce627c2739a97325bc7be5dacde3676a0 Mon Sep 17 00:00:00 2001
From: Kyungtak Woo <kevinwkt1997 at gmail.com>
Date: Tue, 23 Dec 2025 11:31:35 -0600
Subject: [PATCH 2/3] clang fmt

---
 libc/src/__support/alloc-checker.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/__support/alloc-checker.h b/libc/src/__support/alloc-checker.h
index a59f9ee34a0ab..0c4c22edff786 100644
--- a/libc/src/__support/alloc-checker.h
+++ b/libc/src/__support/alloc-checker.h
@@ -11,10 +11,10 @@
 
 #include "hdr/func/aligned_alloc.h"
 #include "hdr/func/malloc.h"
+#include "src/__support/CPP/new.h"
 #include "src/__support/common.h"
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/os.h"
-#include "src/__support/CPP/new.h"
 
 namespace LIBC_NAMESPACE_DECL {
 

>From 5b8bd2c454c455f84e4f3574ba57a5fe55a89b76 Mon Sep 17 00:00:00 2001
From: Kyungtak Woo <kevinwkt1997 at gmail.com>
Date: Tue, 23 Dec 2025 11:59:58 -0600
Subject: [PATCH 3/3] clang fmt after std new

---
 libc/src/__support/alloc-checker.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libc/src/__support/alloc-checker.h b/libc/src/__support/alloc-checker.h
index 0c4c22edff786..824b71d6522f7 100644
--- a/libc/src/__support/alloc-checker.h
+++ b/libc/src/__support/alloc-checker.h
@@ -11,11 +11,12 @@
 
 #include "hdr/func/aligned_alloc.h"
 #include "hdr/func/malloc.h"
-#include "src/__support/CPP/new.h"
 #include "src/__support/common.h"
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/os.h"
 
+#include <new>
+
 namespace LIBC_NAMESPACE_DECL {
 
 class AllocChecker {



More information about the libc-commits mailing list