[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-05 Thread Dan Gohman via Phabricator via cfe-commits
sunfish added a comment. I believe wasi-sdk doesn't have this issue, because it has modifications to all headers which define NULL to always use the NULL defined in stddef.h, and it doesn't ship musl's stddef.h. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-05 Thread Rich Felker via Phabricator via cfe-commits
dalias added a comment. To be clear, musl does not support this regardless of whether `#include_next` is being used "right" or not. The only supported thing is not mixing headers at all. If Emscripten and wasi are using musl-based headers, it probably makes sense for these targets to do the sa

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-05 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Although having said all that, I guess a question for @aaron.ballman or other clang header experts: It does seem that many std C headers in clang are designed to handle this kind of case using `include_next` (e.g. stdint.h and stdatomic.h) but not all of them (e.g. stdd

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-05 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. The 2 common WebAssembly toolchain variants (Emscripten and wasi-sdk) use libcs that are derived from musl (a subset along with additions specific to their environments); they share the system-include configuration in `WebAssembly::AddClangSystemIncludeArgs()` in `clan

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-05 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added subscribers: sbc100, sunfish. dschuff added a comment. The 2 common WebAssembly toolchain variants (Emscripten and wasi-sdk) use libcs that are derived from musl (a subset along with additions specific to their environments); they share the system-include configuration in `WebAsse

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG666098c5b3ea: [Headers] Remove musl-related comment about NULL (authored by aheejin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159383/new/ https://revi

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-03 Thread Rich Felker via Phabricator via cfe-commits
dalias added a comment. musl targets **already** have the libc header path before the compiler header path in a BSD-like configuration (the BSDs also have this order on GCC and I would assume on clang as well), so if the compiler-provided `stddef.h` is getting seen at all, there's either a bug

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. As far as the change goes, this is fine (it keeps the status quo we previously had), but I still wonder if we should be trying to detect that the user is working with musl and do an include_next so our stddef.h header never get

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-01 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D159383#4635703 , @dschuff wrote: > Suggested edit to the commit description: > "use musl and stddef.h at the same time" -> "use musl and clang's stddef.h at > the same time" Done (Both the CL description and the commit messa

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-01 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Suggested edit to the commit description: "use musl and stddef.h at the same time" -> "use musl and clang's stddef.h at the same time" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159383/new/ https://reviews.llvm.org/D159

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-01 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka accepted this revision. ributzka added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159383/new/ https://reviews.llvm.org/D159383 ___

[PATCH] D159383: [Headers] Remove musl-related comment about NULL

2023-09-01 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added reviewers: iana, aaron.ballman, dalias. Herald added a subscriber: wingo. Herald added a project: All. aheejin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This removes a comment added in D159