[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: bruno, ributzka, vsapsai, Bigcheese. Herald added a project: All. iana requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The Darwin module has specified [no_undeclared_includes] for at least f

[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D132971#3759538 , @Bigcheese wrote: > I'm fine with this change, but do we actually have a backwards compatibility > policy anywhere in Clang? Would be good to know what range of SDKs a compiler > release is expected to support.

[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG260fb2bc3f79: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-02 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stdint.h:99-100 typedef __UINT64_TYPE__ uint64_t; +# undef __int_least64_t # define __int_least64_t int64_t +# undef __uint_least64_t What are you seeing that's defining `__int_least64_t` and all these o

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-02 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stdint.h:99-100 typedef __UINT64_TYPE__ uint64_t; +# undef __int_least64_t # define __int_least64_t int64_t +# undef __uint_least64_t iana wrote: > What are you seeing that's defining `__int_least64_t` a

[PATCH] D131213: [clang][Headers] Fix unintentional error in D130800

2022-08-04 Thread Ian Anderson via Phabricator via cfe-commits
iana accepted this revision. iana added a comment. This revision is now accepted and ready to land. That was the only one I saw from D130800 , can someone double check me though? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D131213: [clang][Headers] Fix unintentional error in D130800

2022-08-05 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D131213#3702699 , @ddcc wrote: > I missed line 19, yeah that makes sense. @iana is that ok with you? Ah, I didn't see that either. Can we just lose the `defined` on line 26 then? It's redundant and little confusing. Repository

[PATCH] D140250: Define NULL in its own header

2023-01-03 Thread Ian Anderson via Phabricator via cfe-commits
iana planned changes to this revision. iana added a comment. This needs a bit more work, it looks like it's not enough to just add a header. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 ___

[PATCH] D140250: Define NULL in its own header

2023-01-03 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 486100. iana added a comment. Herald added subscribers: llvm-commits, Sanitizers, Enna1, kadircet, arphaman. Herald added projects: Sanitizers, LLVM, clang-tools-extra. Add a module for __stddef_null.h and give it the same special treatment as __stddef_max_align

[PATCH] D140250: Define NULL in its own header

2023-01-03 Thread Ian Anderson via Phabricator via cfe-commits
iana planned changes to this revision. iana added a comment. I think this should be all we need, but I'm still running tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 __

[PATCH] D140250: Define NULL in its own header

2023-01-24 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 491644. iana added a comment. Fix the broken tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 Files: clang-tools-extra/clang-include-fixer/find-all-symbols/STLPos

[PATCH] D140250: Define NULL in its own header

2023-01-24 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D140250#4076851 , @aaron.ballman wrote: > I'd expect there to be a test under `clang/test/Headers/` showing that this > new header works as expected. It's covered pretty well by stddefneeds.cpp already. I can add a new one if y

[PATCH] D140250: Define NULL in its own header

2023-01-24 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D140250#4077956 , @aaron.ballman wrote: > In D140250#4077826 , @iana wrote: > >> In D140250#4076851 , >> @aaron.ballman wrote: >> >>> I'd expect

[PATCH] D140250: Define NULL in its own header

2023-01-24 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 491869. iana added a comment. Add an explicit header test for __stddef_null.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 Files: clang-tools-extra/clang-include-fi

[PATCH] D140250: Define NULL in its own header

2023-01-24 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D140250#4077974 , @iana wrote: > In D140250#4077956 , @aaron.ballman > wrote: > >> In D140250#4077826 , @iana wrote: >> >>> In D140250#4076851

[PATCH] D140250: Define NULL in its own header

2023-01-24 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll:37 !7 = !DIFile(filename: "clang/12.0.0/include/__stddef_max_align_t.h", directory: "/") -!8 = !DICompositeType(tag: DW_TAG_structure_type, file: !7, line: 19,

[PATCH] D140250: Define NULL in its own header

2023-01-25 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll:37 !7 = !DIFile(filename: "clang/12.0.0/include/__stddef_max_align_t.h", directory: "/") -!8 = !DICompositeType(tag: DW_TAG_structure_type, file: !7, line: 19,

[PATCH] D140250: Define NULL in its own header

2023-01-25 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 492179. iana added a comment. Revert the unnecessary changes to unspecified-var-size.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 Files: clang-tools-extra/clang-

[PATCH] D140250: Define NULL in its own header

2023-01-25 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D140250#4080990 , @rsmith wrote: > Wait a second... if an OS wants only `NULL`, we already have a supported way > of achieving that, which is compatible with GCC and glibc and other POSIX > compilers -- define `__need_NULL` befo

[PATCH] D140250: Define NULL in its own header

2023-01-25 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D140250#4081044 , @aaron.ballman wrote: > In D140250#4081009 , @iana wrote: > >> In D140250#4080990 , @rsmith wrote: >> >>> Wait a second... if a

[PATCH] D140250: Define NULL in its own header

2023-01-25 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D140250#4081119 , @rsmith wrote: > In D140250#4081102 , @rsmith wrote: > >> Our builtin header `stddef.h` shouldn't be built as a module. It >> fundamentally needs to be treated as a text

[PATCH] D140250: Define NULL in its own header

2023-01-25 Thread Ian Anderson via Phabricator via cfe-commits
iana planned changes to this revision. iana added a comment. In D140250#4081133 , @iana wrote: > In D140250#4081119 , @rsmith wrote: > >> In D140250#4081102 , @rsmith wrot

[PATCH] D140250: Define NULL in its own header

2023-01-23 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 491604. iana added a comment. Rebase, update diagnostic to include the full module name instead of just the top level. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 F

[PATCH] D140250: Define NULL in its own header

2023-01-23 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 491607. iana added a comment. Fix the debuginfo-generic-assignment-tracking-sroa test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 Files: clang-tools-extra/clang-in

[PATCH] D140250: Define NULL in its own header

2023-01-23 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll:37 !7 = !DIFile(filename: "clang/12.0.0/include/__stddef_max_align_t.h", directory: "/") -!8 = !DICompositeType(tag: DW_TAG_structure_type, file: !7, line: 19,

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-18 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D159064#4647709 , @vsapsai wrote: > Still going through the patch and through the discussion. But wanted to ask > if there are any complications in reverting this change? For libc++ we've > discussed that we don't really know th

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-18 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/include/clang/Basic/LangOptions.def:176 COMPATIBLE_LANGOPT(CPlusPlusModules, 1, 0, "C++ modules syntax") +LANGOPT(BuiltinHeadersInSystemModules, 1, 0, "builtin headers belong to system modules,

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-19 Thread Ian Anderson via Phabricator via cfe-commits
iana marked 2 inline comments as done. iana added inline comments. Comment at: clang/include/clang/Basic/LangOptions.def:176 COMPATIBLE_LANGOPT(CPlusPlusModules, 1, 0, "C++ modules syntax") +LANGOPT(BuiltinHeadersInSystemModules, 1, 0, "builtin headers belong to system modules,

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-28 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0ea3d88bdb16: [Modules] Add a flag to control builtin headers being in system modules (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15948

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-02 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 557549. iana added a comment. Minimize the testing stdint.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__std

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-02 Thread Ian Anderson via Phabricator via cfe-commits
iana marked 5 inline comments as done. iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. dexonsmith wrote: > Bigcheese wr

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-03 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a7a6dd3c358: [Modules] Make clang modules for the C standard library headers (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: aaron.ballman, rsmith, steplong, efriedma, jyknight, erichkeane. Herald added a subscriber: ributzka. Herald added a project: All. iana requested review of this revision. Herald added subscribers: cfe-commits, wangpc. Herald added a project: clang.

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 549534. iana added a comment. Don't define nullptr_t in C++ if __need_NULL is set without __need_nullptr_t Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757 Files: clang

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/lib/Headers/stddef.h:112 #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) -namespace std { typedef decltype(nullptr) nullptr_t; } -using ::std::nullptr_t; +// __need_NULL would

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/test/Headers/stddef.c:20-23 +// rsize_t will only be defined if __STDC_WANT_LIB_EXT1__ is set to >= 1. +// It would be nice to test the default undefined behavior, but that emits +// a note comin

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Headers/stddefneeds.c:85-87 +// __need_nullptr_t generates an error in https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757 ___ cfe-commits mailing list cfe-commits@

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/test/Headers/stddef.c:20-23 +// rsize_t will only be defined if __STDC_WANT_LIB_EXT1__ is set to >= 1. +// It would be nice to test the default undefined behavior, but that emits +// a note comin

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 549547. iana marked an inline comment as done. iana added a comment. Update the tests to handle diagnostics from stddef.h Fix stddef.h to support defining __STDC_WANT_LIB_EXT1__ if stddef.h has already been included Repository: rG LLVM Github Monorepo CHANG

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-11 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 549572. iana added a comment. Let clang-format update stddef.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757 Files: clang/lib/Headers/stddef.h clang/test/Headers/s

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-12 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: zatrazz, jfb, MaskRay, eli.friedman, aaron.ballman, rsmith, steplong, efriedma, jyknight, erichkeane. Herald added a subscriber: ributzka. Herald added a project: All. iana requested review of this revision. Herald added a project: clang. Herald ad

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-13 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D157793#4583663 , @MaskRay wrote: >> Apple needs a __need_ macro for va_list. Add one, and also ones for >> va_start/va_arg/va_end, __va_copy, va_copy. > > Do you have a link to the specification or the source that this is needed

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-14 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D157793#4585268 , @aaron.ballman wrote: > In D157793#4583698 , @iana wrote: > >> In D157793#4583663 , @MaskRay >> wrote: >> Apple needs a _

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-14 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 550091. iana marked 3 inline comments as done. iana added a comment. Review fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757 Files: clang/lib/Headers/stddef.h c

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-14 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/lib/Headers/stddef.h:16 +defined(__need_wint_t) || \ +(defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1)

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-14 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 550121. iana marked 4 inline comments as done. iana added a comment. Review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157793/new/ https://reviews.llvm.org/D157793 Files: clang/lib/Headers/stdarg.h

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-14 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Headers/stdarg.c:34 +__va_copy(g, v); +va_copy(g, v); // c89-error{{implicit}} c89-note{{va_copy}} c99-no-diagnostics +} aaron.ballman wrote: > You should spell out these diagnostics, and I think `c99-no

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-15 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D157793#4588909 , @jyknight wrote: > I'm a bit confused by this change vs its description. > > It looks like stdarg already supported `__need___va_list`, which is what you > said Apple needs. Does Apple //also// require the other

[PATCH] D158021: [clang][modules] Mark builtin header 'inttypes.h' for modules

2023-08-15 Thread Ian Anderson via Phabricator via cfe-commits
iana added a subscriber: vsapsai. iana added a comment. Herald added a subscriber: ormris. Can you add @vsapsai to the reviewers please? He was looking at this one a year or two ago. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158021/new/ https:

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-16 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added a comment. In D157757#4592766 , @philnik wrote: > I think these changes would allow us to drop the `stddef.h` compat header > from libc++, which would be really nice. I'd really rather not change how `nu

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-16 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 550823. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157793/new/ https://reviews.llvm.org/D157793 Files: clang/lib/Headers/stdarg.h clang/test/Headers/stdarg.c clang/test/Heade

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-16 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 550826. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757 Files: clang/lib/Headers/stddef.h clang/test/Headers/stddef.c clang/test/Heade

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-16 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D157757#4592794 , @iana wrote: > In D157757#4592766 , @philnik wrote: > >> I think these changes would allow us to drop the `stddef.h` compat header >> from libc++, which would be really

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-18 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D157757#4600357 , @ldionne wrote: > This is going to be really naive, but can someone explain why we need these > `__need_X` macros? Why doesn't `` simply always declare what it > should declare? Also, does anybody understan

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-21 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stddef.h:118-122 +#ifdef __cplusplus +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; aaron.ballman wrote: > iana wrote: > > ldionne wrote: > > > iana wrote: > > > > aaron

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-21 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stddef.h:118-122 +#ifdef __cplusplus +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; aaron.ballman wrote: > iana wrote: > > aaron.ballman wrote: > > > iana wrote: > > > >

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-22 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stddef.h:1 /*=== stddef.h - Basic type definitions === * aaron.ballman wrote: > ldionne wrote: > > Making a thread out of this: > > > > > The relationship between cl

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-22 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 552591. iana added a comment. Only define nullptr_t in C++ if _MSC_EXTENSIONS is defined, even if __need_nullptr_t is explicitly set. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-22 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stddef.h:118-122 +#ifdef __cplusplus +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; aaron.ballman wrote: > ldionne wrote: > > iana wrote: > > > aaron.ballman wrote: > >

[PATCH] D156948: [clang][modules] Add -Wsystem-headers-in-module=

2023-08-08 Thread Ian Anderson via Phabricator via cfe-commits
iana accepted this revision. iana added inline comments. Comment at: clang/include/clang/Basic/DiagnosticOptions.h:128 + /// whether -Wsystem-headers is enabled on a per-module basis. + std::vector SystemHeaderWarningsModules; + benlangmuir wrote: > jansvoboda1

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: aaron.ballman, rsmith, efriedma, ldionne, ChuanqiXu, Bigcheese, vsapsai, benlangmuir. Herald added a subscriber: ributzka. Herald added a project: All. iana requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald a

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556192. iana added a comment. Rebase on top of D159483 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana marked 2 inline comments as done. iana added inline comments. Comment at: clang/lib/Headers/module.modulemap:269 + explicit module wint_t { +header "__stddef_wint_t.h" +export * Arguably this should be textual since stddef.h shouldn't own wint_t and

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. A big assumption this patch makes is that `ModuleMap::isBuiltinHeader` is primarily to support Apple's unfortunate module needs. Thus this patch turns that behavior off by default, which makes things work the way one would expect. That is, when usr/include/module.modulemap

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/include/clang/Driver/Options.td:2944 [NoXarchOption], [ClangOption, CLOption]>>; +def fbuiltin_headers_in_system_modules : Flag <["-"], "fbuiltin-headers-in-system-modules">, + Group, I don't love this fl

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D159483#4641231 , @benlangmuir wrote: >> but need to be repeatedly included when they're used in system modules > > How does this work today? Wouldn't the include guard prevent this? Today they don't define their include guard w

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/include/clang/Basic/Features.def:233 FEATURE(modules, LangOpts.Modules) +FEATURE(builtin_headers_in_system_modules, LangOpts.BuiltinHeadersInSystemModules) FEATURE(safe_stack, LangOpts.Sanitiz

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added a comment. In D159483#4641289 , @benlangmuir wrote: >>> How does this work today? Wouldn't the include guard prevent this? >> >> Today they don't define their include guard when building with modules. > >

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556206. iana added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159483/new/ https://reviews.llvm.org/D159483 Files: clang/include/clang/Basic/Features.def clang/include/clang/Basic/

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556207. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159483/new/ https://reviews.llvm.org/D159483 Files: clang/include/clang/Basic/Features.def clang/include/clang/Basic/LangOpti

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556208. iana added a comment. Fix formatting issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stddef_null.

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/include/clang/Basic/Features.def:233 FEATURE(modules, LangOpts.Modules) +FEATURE(builtin_headers_in_system_modules, LangOpts.BuiltinHeadersInSystemModules) FEATURE(safe_stack, LangOpts.Sanitiz

[PATCH] D140250: Define NULL in its own header

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana abandoned this revision. iana added a comment. This was succeeded by D158709 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 __

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556230. iana marked 3 inline comments as done. iana added a comment. Add comments to stdarg.h and stddef.h explaining their interesting header guard setup. Ignore -fbuiltin-headers-in-system-modules if -fmodules isn't passed. DriverKit doesn't need to pass -fbui

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556231. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stddef_null.h clang/lib/

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556279. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159483/new/ https://reviews.llvm.org/D159483 Files: clang/include/clang/Basic/Features.def clang/include/clang/Basic/LangOpti

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556280. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stddef_null.h clang/lib/

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. benlangmuir wrote: > Why do we need all this code now (I assume this is

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. iana wrote: > benlangmuir wrote: > > Why do we need all this code now (

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. dexonsmith wrote: > benlangmuir wrote: > > iana wrote: > > > iana wrote

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556311. iana added a comment. Try deleting the module cache to fix the failing tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556313. iana added a comment. Add the header guard comment to __stddef_null.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-09 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556355. iana added a comment. - Drop the -verify off the new tests so that I can get the full errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/B

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-09 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556356. iana added a comment. - Drop the -verify off the stddef tests so that I can get the full errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/li

[PATCH] D158021: [clang][modules] Mark builtin header 'inttypes.h' for modules

2023-09-12 Thread Ian Anderson via Phabricator via cfe-commits
iana requested changes to this revision. iana added a comment. This revision now requires changes to proceed. I was talking to Ben about this one a little today since I ended up needing to make the same `-isystem`/`-I` -> `-internal-isystem` switch in some of the unit tests in D159064

[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

2023-09-12 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556627. iana added a comment. __stddef_max_align_t.h always needs a header guard, because the type merger can't handle struct's. If it has a header guard then it always needs to have a module too, even if `-fbuiltin-headers-in-system-modules` is passed. Change

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-13 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556629. iana added a comment. Adjust for the changes in D159483 . Mostly the header guards that were added in that review have moved to this one, the stdarg module needs to always be allowed, and a few tests needed to adjust f

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-13 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556630. iana added a comment. Actually allow the stdarg module Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-14 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/module.modulemap:269 + explicit module wint_t { +header "__stddef_wint_t.h" +export * iana wrote: > Arguably this should be textual since stddef.h shouldn't own wint_t and it's > just here for co

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
iana marked 13 inline comments as done. iana added inline comments. Comment at: clang/lib/Headers/stddef.h:119-121 +namespace std { +typedef decltype(nullptr) nullptr_t; +} ldionne wrote: > You could reduce the diff by not reformatting this. That's what I did ini

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added a comment. In D157757#4611425 , @ldionne wrote: > Also we should figure out why the Clang modules build is failing on top of > this, it doesn't look like a false positive. Where do you see that failure?

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D157757#4611492 , @iana wrote: > In D157757#4611425 , @ldionne wrote: > >> Also we should figure out why the Clang modules build is failing on top of >> this, it doesn't look like a false

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 552971. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757 Files: clang/lib/Headers/stddef.h clang/test/Headers/stddef.c clang/test/Heade

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 553003. iana added a comment. Try rebasing one more time Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757 Files: clang/lib/Headers/stddef.h clang/test/Headers/stddef.

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. Windows succeeding earlier, I'm pretty confident that the current crash isn't due to this review, so I'm going to go ahead and land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157757/new/ https://reviews.llvm.org/D157757

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG62f769aa82f6: [Headers] Add missing __need_ macros to stdarg.h (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157793/new/ https://reviews

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG72da678d8c84: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros (authored by iana). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized

2023-08-24 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: aaron.ballman, rsmith, efriedma, ldionne. Herald added subscribers: Enna1, ributzka, mstorsjo, kadircet, arphaman. Herald added a project: All. iana requested review of this revision. Herald added projects: clang, Sanitizers, LLVM, clang-tools-extra

[PATCH] D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized

2023-08-24 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 553242. iana added a comment. Fixed the failing test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158709/new/ https://reviews.llvm.org/D158709 Files: clang-tools-extra/clang-include-fixer/find-all-symbols/STLP

[PATCH] D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized

2023-08-24 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 553360. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158709/new/ https://reviews.llvm.org/D158709 Files: clang-tools-extra/clang-include-fixer/find-all-symbols/STLPostfixHeaderMap.

  1   2   >