[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] 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-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] 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] 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-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] 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] 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] 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-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] 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] 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] 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] 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-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-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 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 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. 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 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] 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-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-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] 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 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] 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 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] 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 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 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 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 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. 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] 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] 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] 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-01 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. Ah, the tests are failing because some of them are putting the builtin headers in other modules. This is going to need the "optionally ignore the builtin modules" change first then. I almost have that one finished. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D159312: [Headers] Remove a space in NULL define

2023-08-31 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. Can you add a comment that says the spacing is important please? Although why the heck is musl declaring NULL in stdio.h? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

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

2023-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554882. iana added a comment. Update Module::directlyUses 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/__stdde

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

2023-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554832. iana marked an inline comment as done. iana added a comment. The nullptr_t submodule can't require c23 because it needs to be used in C++ in some cases too. Remove the `requires` from the module map and add a C23 guard to the header. Repository: rG

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

2023-08-30 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_null.h:14 + * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. + * Modules don't support redefining macros like that, but support that pattern +

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

2023-08-30 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG680da4b5d7ec: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces… (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D159018: [clang][modules] Add a c23 module feature

2023-08-29 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGadb68c979d84: [clang][modules] Add a c23 module feature (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159018/new/ https://reviews.llvm.o

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

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/__stddef_null.h:14 + * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. + * Modules don't support redefining macros like that, but support that pattern + * in the non-modules case. ---

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

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554193. iana added a comment. Add `@import` tests for all of the new modules Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Headers/__stddef_max_alig

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

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554183. iana added a comment. Remove the module cache before running the stdarg/stddef unit tests in module mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files:

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

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

[PATCH] D159018: [clang][modules] Add a c23 module feature

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554158. iana added a comment. remove the extra #endif (which oddly didn't produce an error locally so I must've ran the tests wrong the first time...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159018/new/ htt

[PATCH] D159018: [clang][modules] Add a c23 module feature

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. Would we want to back port this to llvm 17? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159018/new/ https://reviews.llvm.org/D159018 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D159018: [clang][modules] Add a c23 module feature

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: ChuanqiXu, Bigcheese, v.g.vassilev, aaron.ballman. Herald added a subscriber: ributzka. Herald added a project: All. iana requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a c23 module fea

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

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D158709#4621199 , @aaron.ballman wrote: > At a high-level (not just for this patch, but for the entire series): is this > need specific to your downstream or is this a more general need? e.g., should > this complexity be kept d

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

2023-08-25 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 553677. iana added a comment. Modules don't support the #include #undef #include pattern to redefine macros, the second include has no effect. Move the #undef of NULL into __stddef_null.h so that the textual behavior is preserved, but the module behavior doesn'

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

2023-08-25 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D158709#4617295 , @aaron.ballman wrote: > I'm a bit concerned about the impact on (non-modules) build time performance. > This splits stddef.h and stdarg.h into needing to open 14 different files > instead of 2. Hopefully that'

[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.

[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 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] 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] 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
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] 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 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 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 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 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-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] 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: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-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-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-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-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-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] 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 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] 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] 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] 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-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] 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] 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] 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] 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-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] 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] 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 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 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 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 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] 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] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

2023-05-10 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. I wonder if clang should have better module interaction with the header maps produced by Xcode, or if Xcode should produce better header maps to work with clang. Or are you having problems with header maps outside of Xcode? Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

2023-05-10 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Modules/implicit-module-header-maps.cpp:52 +//header and trip a `#error`, or +// 2) header maps aren't usesd, as the header name doesn't exist and relies on +//the header map to remap it to the real header. --

[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-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 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#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 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 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,

  1   2   >