[clang] 666098c - [Headers] Remove musl-related comment about NULL

Heejin Ahn via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 13:29:34 PDT 2023


Author: Heejin Ahn
Date: 2023-09-05T13:29:02-07:00
New Revision: 666098c5b3ea6e01ffe9e827064c26dfaaf9c655

URL: https://github.com/llvm/llvm-project/commit/666098c5b3ea6e01ffe9e827064c26dfaaf9c655
DIFF: https://github.com/llvm/llvm-project/commit/666098c5b3ea6e01ffe9e827064c26dfaaf9c655.diff

LOG: [Headers] Remove musl-related comment about NULL

This removes a comment added in D159312, which warned people to not
re-add a whitespace in the `((void*)0))` expression. After discussions
happened in D159312, it doesn't seem like a permanent solution.

While I'd like to keep the whitespace removed for now, given that at
least it can be a band-aid to some users who use musl and clang's
`stddef.h` at the same time, it seems the usage of them together is not
something that's officially supported, and I should not be implying this
should be the permanent solution by saying so in the comments.

Reviewed By: aaron.ballman, ributzka

Differential Revision: https://reviews.llvm.org/D159383

Added: 
    

Modified: 
    clang/lib/Headers/__stddef_null.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/__stddef_null.h b/clang/lib/Headers/__stddef_null.h
index 6244964ac871fe..77d7a54025380b 100644
--- a/clang/lib/Headers/__stddef_null.h
+++ b/clang/lib/Headers/__stddef_null.h
@@ -15,9 +15,5 @@
 #define NULL 0
 #endif
 #else
-// Don't add any whitespaces in ((void*)0) below!
-// musl (https://www.musl-libc.org/) redefines `NULL` as such and redefinition
-// with a 
diff erent expression, even in terms of a single whitespace, causes a
-// warning.
 #define NULL ((void*)0)
 #endif


        


More information about the cfe-commits mailing list