[PATCH] D121098: [C++20][Modules][HU 4/5] Handle pre-processed header units.

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121098#3384590 , @ChuanqiXu wrote: > In D121098#3383835 , @iains wrote: > >>> I am a little bit confused for the intuition. Couldn't we just import the >>> pre-processed header? What's

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 3 inline comments as done. iains added a comment. In D121588#3384799 , @vsapsai wrote: > Sorry, I'm pretty ignorant in this area but based on > >> The job construction is altered to build a C++20 header unit (rather than a >> PCH file, as wo

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121589#3381989 , @ChuanqiXu wrote: > In D121589#3381894 , @iains wrote: > >> In D121589#3381343 , @ChuanqiXu >> wrote: >> It's not practic

[PATCH] D121590: [C++20][Modules][Driver][HU 3/N] Handle foo.h with -fmodule-header and/or C++ invocation.

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121590#3381344 , @ChuanqiXu wrote: > This looks a little bit odd. Is this consistent with GCC too? It is consistent, GCC does not warm for this - but that was not the primary motivation in this case. This is simply a convenie

[PATCH] D121591: [C++20][Modules][Driver][HU 4/N] Add fdirectives-only mode for preprocessing output.

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121591#3381348 , @ChuanqiXu wrote: > Oh, I found all the series of patches looks confusing to me. Maybe due to > that I lack a use experience with header unit. I really couldn't judge if it > is necessary or useful. Could you

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 3 inline comments as done. iains added inline comments. Comment at: clang/lib/Frontend/FrontendOptions.cpp:30-31 .Case("cppm", Language::CXX) + .Case("iih", InputKind(Language::CXX).getPreprocessed()) .Case("iim", InputKind(Language::CXX).getPrepro

[PATCH] D121497: Lex: add support for `{,u}i128` Microsoft extension

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. could we see an example of the modular code that fails (and what flavour of modules compilation is being used)? or is there already a PR for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121497/new/ https://reviews.llv

[PATCH] D121497: Lex: add support for `{,u}i128` Microsoft extension

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a subscriber: vsapsai. iains added a comment. hmm that makes it quite hard to analyse what's going on ... .. however, it seems that this is a clang-modules style build (I am more familiar with the C++20 modules stuff, so probably @vsapsai will be able to throw more light on this). h

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416162. iains marked an inline comment as done. iains added a comment. match windows path delimiters in testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121096/new/ https://reviews.llvm.org/D121096 Files:

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2855-2857 + assert((DashX.getHeaderUnit() == InputKind::HeaderUnit_None || + Inputs.size() == 1) && + "Expected only one input file for header unit"); ChuanqiXu w

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416194. iains marked 4 inline comments as done. iains added a comment. Herald added a subscriber: dexonsmith. address review comments, match windows path separators in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/include/clang/Serialization/ASTWriter.h:127-128 + /// The module is a header unit. + bool IsHeaderUnit = false; + ChuanqiXu wrote: > I think the member is redundant. I thought we could use > `WritingModule->isHe

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416332. iains added a comment. adress review comments, adjust test case for windows compatibility. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121588/new/ https://reviews.llvm.org/D121588 Files: clang/includ

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416364. iains added a comment. adjust testcase path separators Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121588/new/ https://reviews.llvm.org/D121588 Files: clang/include/clang/Driver/Types.def clang/lib

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/test/Driver/cxx20-header-units-01.cpp:7 + +// RUN: %clang++ -### -std=c++20 -xc++-header-unit-header %S/Inputs/header-unit-01.hh 2>&1 | \ +// RUN: FileCheck -check-prefix=CHECK-ABS %s -DTDIR=%S/Inputs vsapsai wrot

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121588#3390956 , @vsapsai wrote: > Thanks for explaining the desired interplay between PCH and PCM. The problem > I'm seeing is that it can be hard to find correct compiler flags to achieve > the desired result (what is enable

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-18 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121097#3391236 , @ChuanqiXu wrote: > I feel good if we could add the test from: > http://eel.is/c++draft/cpp.import#8. I agree we should have tests based on all the relevant examples in the standard. However, that specific e

[PATCH] D121497: Lex: add support for `{,u}i128` Microsoft extension

2022-03-18 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121497#3388870 , @aaron.ballman wrote: > In D121497#3388024 , @compnerd > wrote: > >> I don't have an example module sadly. It was something that I ran into with >> Swift code import

[PATCH] D121271: [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-19 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. it looks like the test case is failing everywhere - perhaps as a result of changes in the mangling scheme? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121271/new/ https://reviews.llvm.org/D121271 _

[PATCH] D121095: [C++20][Modules][HU 1/5] Introduce header units as a module type.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416841. iains added a comment. rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121095/new/ https://reviews.llvm.org/D121095 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/Basic/La

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416842. iains added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121096/new/ https://reviews.llvm.org/D121096 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clan

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416845. iains added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121097/new/ https://reviews.llvm.org/D121097 Files: clang/include/clang/Basic/Module.h clang/include/clang/Serialization/

[PATCH] D121098: [C++20][Modules][HU 4/5] Handle pre-processed header units.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416847. iains added a comment. rebased, added test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121098/new/ https://reviews.llvm.org/D121098 Files: clang/lib/Frontend/FrontendAction.cpp clang/lib/Sema/Sema

[PATCH] D121099: [C++20][Modules][HU 5/5] Add fdirectives-only mode for preprocessing output.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416850. iains added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121099/new/ https://reviews.llvm.org/D121099 Files: clang/include/clang/Driver/Options.td clang/include/clang/Frontend/Pr

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416853. iains added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121588/new/ https://reviews.llvm.org/D121588 Files: clang/include/clang/Driver/Types.def clang/lib/Driver/Driver.cpp cl

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416854. iains added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121589/new/ https://reviews.llvm.org/D121589 Files: clang/include/clang/Driver/Driver.h clang/include/clang/Driver/Option

[PATCH] D121590: [C++20][Modules][Driver][HU 3/N] Handle foo.h with -fmodule-header and/or C++ invocation.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416855. iains added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121590/new/ https://reviews.llvm.org/D121590 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/cxx20-header-units-02.c

[PATCH] D121591: [C++20][Modules][Driver][HU 4/N] Add fdirectives-only mode for preprocessing output.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 416856. iains added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121591/new/ https://reviews.llvm.org/D121591 Files: clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/Clang.cpp c

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. Herald added a project: All. iains added reviewers: rsmith, urnathan, ChuanqiXu. iains added a subscriber: clang-modules. iains published this revision for review. iains added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. this covers

[PATCH] D122124: [C++20][Modules] Add testcases from section 10.2 dependent on header units.

2022-03-21 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. Herald added a project: All. iains added a reviewer: ChuanqiXu. iains published this revision for review. iains added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. there might be more cases to add here, from later sections in the sta

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-03-22 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 2 inline comments as done. iains added subscribers: vsapsai, dblaikie. iains added a comment. So the adjustment to the error message is something I am 50/50 about (IMO it makes some messages more useful, but maybe not needed in others). Without the change we get "cannot export rede

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-03-22 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 2 inline comments as done. iains added a comment. In D122119#3398949 , @ChuanqiXu wrote: > In D122119#3398823 , @iains wrote: > >> So the adjustment to the error message is something I am 50/50 about

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-23 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. for the record, I experimented with adding the linkage as an output for AST dumps (adding to TextNodeDumper / DeclPrinter), since it seems that this could be generally useful. this works fine, but, it would create a lot of testsuite churn - around 350 tests would need ame

[PATCH] D120874: [C++20] [Modules] Use '-' as the separator of partitions when searching in filesystems

2022-03-23 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. I have no comment the patch itself, that seems fine, I even agree that this could be convenient :-) However, I am concerned that this now means that '-fprebuilt-module-path' has meaning for both clang modules and c++20 modules - which is something we agree is generally u

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-04-08 Thread Iain Sandoe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf60dc3caa673: [C++20][Modules] Adjust handling of exports of namespaces and using-decls. (authored by iains). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-04-11 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked an inline comment as done. iains added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:814-815 +diagExportedUnnamedDecl(S, UnnamedDeclKind::Namespace, D, BlockStart); + else +; // We allow an empty named namespace decl. +} else if

[PATCH] D122124: [C++20][Modules] Add testcases from section 10.2 dependent on header units.

2022-04-11 Thread Iain Sandoe 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 rGbdadf1c2ecb4: [C++20][Modules] Add testcases from section 10.2 dependent on header units. (authored by iains). Repository: rG LLVM Github Monorepo

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-18 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/include/clang/Basic/Module.h:537-543 + static StringRef getPrimaryModuleInterfaceName(StringRef Name) { +return Name.split(':').first; + } + /// Get the primary module interface name from a partition. StringRef getPrimary

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/include/clang/Basic/Module.h:537-543 + static StringRef getPrimaryModuleInterfaceName(StringRef Name) { +return Name.split(':').first; + } + /// Get the primary module interface name from a partition. StringRef getPrimary

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. it would be good to add tests for GMF and PMF cases? Comment at: clang/include/clang/Basic/Module.h:550-553 if (isModulePartition()) { auto pos = Name.find(':'); return StringRef(Name.data(), pos); } if we find thi

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-20 Thread Iain Sandoe via Phabricator via cfe-commits
iains accepted this revision. iains added a comment. This revision is now accepted and ready to land. thanks for multiple iterations! I think maybe you are using a too old clang-format? it seems that clang-format >= llvm-14 removes spaces around module partition colons ... so `A : Part`==>`A:P

[PATCH] D119823: [Modules] Add module structure output to -module-file-info.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains added reviewers: dblaikie, aprantl, urnathan, ChuanqiXu. iains published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. It is useful to be able to visualise the C++20 modules content of a PCM file both for inspect

[PATCH] D119826: [clang] Remove a duplicate action kind table entry.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains added a reviewer: jansvoboda11. iains published this revision for review. iains added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. probably trivial - but, in case there's some subtlety I missed... We have two entries for OPT

[PATCH] D119826: [clang] Remove a duplicate action kind table entry.

2022-02-15 Thread Iain Sandoe 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 rG2370977bdd02: [clang] Remove a duplicate action kind table entry. (authored by iains). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D118893: [C++20][Modules] Track valid import state.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains updated this revision to Diff 408755. iains added a comment. iains added reviewers: rsmith, urnathan, ChuanqiXu. iains updated this revision to Diff 408803. iains published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-com

[PATCH] D114714: [C++20][Modules] Add enumerations for partition modules and stream them.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. Herald added a subscriber: dexonsmith. iains updated this revision to Diff 404447. iains added a comment. iains retitled this revision from "[modules] Add enumerations for partition modules and stream them." to "[C++20][Modules] Add enumerations for partition modules

[PATCH] D118586: [C++20][Modules] Initial handling for module partitions.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains updated this revision to Diff 405588. iains added a comment. iains updated this revision to Diff 405590. iains updated this revision to Diff 408760. iains updated this revision to Diff 408855. iains added reviewers: rsmith, urnathan, ChuanqiXu. iains published thi

[PATCH] D118587: [C++20][Modules] Handle generation of partition implementation CMIs.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains updated this revision to Diff 405593. iains added a comment. iains updated this revision to Diff 408762. iains updated this revision to Diff 408862. iains added reviewers: rsmith, urnathan, ChuanqiXu. iains published this revision for review. Herald added a projec

[PATCH] D118588: [C++20][Modules] Diagnose wrong import/export for partition CMIs.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains updated this revision to Diff 404484. iains added a comment. iains updated this revision to Diff 405594. iains updated this revision to Diff 405595. iains updated this revision to Diff 408763. iains updated this revision to Diff 408864. iains added reviewers: rsmi

[PATCH] D118589: [C++20][Modules] Record direct module imports.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains updated this revision to Diff 404485. iains added a comment. iains updated this revision to Diff 405596. iains updated this revision to Diff 408764. iains added reviewers: rsmith, urnathan, ChuanqiXu. iains published this revision for review. Herald added a projec

[PATCH] D118598: [C++20][Modules] Find the primary interface name for a module.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. Herald added a subscriber: dexonsmith. iains updated this revision to Diff 405600. iains added a comment. iains updated this revision to Diff 408765. iains added reviewers: rsmith, urnathan, ChuanqiXu. iains published this revision for review. Herald added a project: cl

[PATCH] D118599: [C++20][Modules] Amend module visibility rules for partitions.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. iains updated this revision to Diff 405601. iains added a comment. iains updated this revision to Diff 408766. iains updated this revision to Diff 408866. iains added reviewers: rsmith, urnathan, ChuanqiXu. iains updated this revision to Diff 408892. iains published thi

[PATCH] D119823: [Modules] Add module structure output to -module-file-info.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 408930. iains added a comment. address review comment, fix formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119823/new/ https://reviews.llvm.org/D119823 Files: clang/lib/Frontend/FrontendActions.cpp

[PATCH] D118893: [C++20][Modules] Track valid import state.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1543 +def err_import_not_allowed_here : Error< + "imports must be contiguous and immediately follow the module declaration">; +def err_import_in_global_fragment : Error< u

[PATCH] D114714: [C++20][Modules] Add enumerations for partition modules and stream them.

2022-02-15 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/include/clang/Basic/Module.h:109 -/// This is a C++ Modules TS module interface unit. +/// This is a C++ Modules TS or C++20 module interface unit. ModuleInterfaceUnit, urnathan wrote: > I think it's c

[PATCH] D119823: [Modules] Add module structure output to -module-file-info.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/test/Modules/module-file-info-cxx20.cpp:26 + +#if TU == 1 + ChuanqiXu wrote: > According to [[ > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1857r3.html | > P1857R3 ]], it might not be good to add macr

[PATCH] D118893: [C++20][Modules] Track valid import state.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409178. iains marked 2 inline comments as not done. iains added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118893/new/ https://reviews.llvm.org/D118893 Files: clang/inclu

[PATCH] D118893: [C++20][Modules][1/8] Track valid import state.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 5 inline comments as done. iains added a comment. also reformatted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118893/new/ https://reviews.llvm.org/D118893 ___ cfe-commits mailing list cf

[PATCH] D114714: [C++20][Modules] Add enumerations for partition modules and stream them.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409187. iains added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114714/new/ https://reviews.llvm.org/D114714 Files: clang/include/clang/Basic/Module.h clang/lib/AST/Decl.

[PATCH] D114714: [C++20][Modules][2/8] Add enumerations for partition modules and stream them.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 4 inline comments as done. iains added inline comments. Comment at: clang/include/clang/Basic/Module.h:109 -/// This is a C++ Modules TS module interface unit. +/// This is a C++ Modules TS or C++20 module interface unit. ModuleInterfaceUnit, -

[PATCH] D118586: [C++20][Modules] Initial handling for module partitions.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409201. iains added a comment. Update to rebase on changes to parent patches and formatting checks. while doing this made a check for module partitions more efficient. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D118587: [C++20][Modules] Handle generation of partition implementation CMIs.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409202. iains added a comment. rebased onto changes in parent patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118587/new/ https://reviews.llvm.org/D118587 Files: clang/include/clang/Sema/Sema.h clang/

[PATCH] D118588: [C++20][Modules] Diagnose wrong import/export for partition CMIs.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409203. iains added a comment. rebased onto changes in parent commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118588/new/ https://reviews.llvm.org/D118588 Files: clang/include/clang/Basic/DiagnosticSema

[PATCH] D118589: [C++20][Modules] Record direct module imports.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409205. iains added a comment. rebased onto changes in parent patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118589/new/ https://reviews.llvm.org/D118589 Files: clang/include/clang/Sema/Sema.h clang/

[PATCH] D118598: [C++20][Modules] Find the primary interface name for a module.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409209. iains added a comment. rebased onto changes in parent patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118598/new/ https://reviews.llvm.org/D118598 Files: clang/include/clang/Basic/Module.h cla

[PATCH] D118599: [C++20][Modules] Amend module visibility rules for partitions.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409211. iains added a comment. rebased onto changes in parent patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118599/new/ https://reviews.llvm.org/D118599 Files: clang/lib/Sema/SemaLookup.cpp clang/te

[PATCH] D119823: [Modules] Add module structure output to -module-file-info.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/test/Modules/module-file-info-cxx20.cpp:26 + +#if TU == 1 + urnathan wrote: > urnathan wrote: > > ChuanqiXu wrote: > > > iains wrote: > > > > ChuanqiXu wrote: > > > > > According to [[ > > > > > http://www.open-std.

[PATCH] D118598: [C++20][Modules][7/8] Find the primary interface name for a module.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/include/clang/Basic/Module.h:523-524 + std::string getPrimaryModuleInterfaceName() const { +std::string::size_type pos = Name.find(':'); +if (pos == std::string::npos) + return Name; urnathan wrote: > h

[PATCH] D118598: [C++20][Modules][7/8] Find the primary interface name for a module.

2022-02-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/include/clang/Basic/Module.h:523-524 + std::string getPrimaryModuleInterfaceName() const { +std::string::size_type pos = Name.find(':'); +if (pos == std::string::npos) + return Name; iains wrote: > urna

[PATCH] D118893: [C++20][Modules][1/8] Track valid import state.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409521. iains added a comment. address review comments, rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118893/new/ https://reviews.llvm.org/D118893 Files: clang/include/clang/Basic/DiagnosticParseKinds.t

[PATCH] D118893: [C++20][Modules][1/8] Track valid import state.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 5 inline comments as done. iains added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:82 if (getLangOpts().Modules || getLangOpts().DebuggerSupport) { - SingleDecl = ParseModuleImport(AtLoc); + Sema::ModuleImportState IS = Sema::ModuleImpor

[PATCH] D118893: [C++20][Modules][1/8] Track valid import state.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 4 inline comments as done. iains added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:144 GlobalModuleFragment = ModuleScopes.back().Module; // In C++20, the module-declaration must be the first declaration if there ChuanqiXu wr

[PATCH] D118893: [C++20][Modules][1/8] Track valid import state.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409546. iains added a comment. amended an assert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118893/new/ https://reviews.llvm.org/D118893 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/inc

[PATCH] D114714: [C++20][Modules][2/8] Add enumerations for partition modules and stream them.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409548. iains marked an inline comment as done. iains added a comment. rebased onto changes in parent patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114714/new/ https://reviews.llvm.org/D114714 Files:

[PATCH] D118586: [C++20][Modules][3/8] Initial handling for module partitions.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409552. iains added a comment. address review comments, rebase onto parent patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118586/new/ https://reviews.llvm.org/D118586 Files: clang/include/clang/AST/Dec

[PATCH] D118586: [C++20][Modules][3/8] Initial handling for module partitions.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 7 inline comments as done. iains added a comment. some comments remain to be addressed - this update addressed Nathan's primarily - but also cover some of Chuanqi's Comment at: clang/include/clang/Sema/Sema.h:2989 /// \param ImportLoc The location of the 'impor

[PATCH] D118586: [C++20][Modules][3/8] Initial handling for module partitions.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409614. iains marked 9 inline comments as done. iains added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118586/new/ https://reviews.llvm.org/D118586 Files: clang/include/cl

[PATCH] D118586: [C++20][Modules][3/8] Initial handling for module partitions.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:177 + if (IsPartition) { +ModuleName += ":"; +ModuleName += stringFromPath(Partition); urnathan wrote: > iains wrote: > > ChuanqiXu wrote: > > > I chose '-' in my implementation since

[PATCH] D118587: [C++20][Modules][4/8] Handle generation of partition implementation CMIs.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409627. iains marked 2 inline comments as done. iains added a comment. address review comments, rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118587/new/ https://reviews.llvm.org/D118587 Files: clang/in

[PATCH] D118587: [C++20][Modules][4/8] Handle generation of partition implementation CMIs.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/test/Modules/cxx20-10-1-ex1.cpp:7-8 + +// RUN: %clang_cc1 -std=c++20 -emit-module-interface -D TU=1 -x c++ %s \ +// RUN: -o %t/A_Internals.pcm + ChuanqiXu wrote: > In my implementation, I replace ':' to '-' in pcm f

[PATCH] D118588: [C++20][Modules]5/8] Diagnose wrong import/export for partition CMIs.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409633. iains added a comment. rebased onto changes in parent patches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118588/new/ https://reviews.llvm.org/D118588 Files: clang/include/clang/Basic/DiagnosticSemaK

[PATCH] D118587: [C++20][Modules][4/8] Handle generation of partition implementation CMIs.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409637. iains added a comment. fix a typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118587/new/ https://reviews.llvm.org/D118587 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaModule.cpp cla

[PATCH] D118589: [C++20][Modules][6/8] Record direct module imports.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409645. iains added a comment. rebased onto parent patch changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118589/new/ https://reviews.llvm.org/D118589 Files: clang/include/clang/Sema/Sema.h clang/lib/Se

[PATCH] D118598: [C++20][Modules][7/8] Find the primary interface name for a module.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409665. iains added a comment. address review comments, rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118598/new/ https://reviews.llvm.org/D118598 Files: clang/include/clang/Basic/Module.h clang/lib/S

[PATCH] D118598: [C++20][Modules][7/8] Find the primary interface name for a module.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409666. iains marked an inline comment as done. iains added a comment. remove stray blank line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118598/new/ https://reviews.llvm.org/D118598 Files: clang/include/cl

[PATCH] D118598: [C++20][Modules][7/8] Find the primary interface name for a module.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 2 inline comments as done. iains added inline comments. Comment at: clang/include/clang/Basic/Module.h:523-524 + std::string getPrimaryModuleInterfaceName() const { +std::string::size_type pos = Name.find(':'); +if (pos == std::string::npos) + return Na

[PATCH] D118599: [C++20][Modules][8/8] Amend module visibility rules for partitions.

2022-02-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 409671. iains added a comment. rebase onto parent patch changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118599/new/ https://reviews.llvm.org/D118599 Files: clang/lib/Sema/SemaLookup.cpp clang/test/Mod

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-04-22 Thread Iain Sandoe 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 rG5c6a14649843: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}… (authored by iains). Herald added a subscriber: MaskRay. Re

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-04-22 Thread Iain Sandoe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c4ff004a270: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header= (authored by iains). Changed prior to commit: https://reviews.llvm.org/D121589?vs=418220&id=424459#toc Repository: r

[PATCH] D121590: [C++20][Modules][Driver][HU 3/N] Handle foo.h with -fmodule-header and/or C++ invocation.

2022-04-23 Thread Iain Sandoe 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 rG5996306c24ba: [C++20][Modules][Driver][HU 3/N] Handle foo.h with -fmodule-header and/or C++… (authored by iains). Repository: rG LLVM Github Monor

[PATCH] D121591: [C++20][Modules][Driver][HU 4/N] Add fdirectives-only mode for preprocessing output.

2022-04-23 Thread Iain Sandoe 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 rG9dc9b21488ee: [C++20][Modules][Driver][HU 4/N] Add fdirectives-only mode for preprocessing… (authored by iains). Repository: rG LLVM Github Monore

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-04-25 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:1183-1185 +.. option:: -fmodule-header=\[user,system\] + +Build a C++20 header unit, but search for the header in the user or system header search paths respectively. tahonermann w

[PATCH] D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl.

2022-04-28 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D124287#3479484 , @jansvoboda11 wrote: > In D124287#3476040 , @vsapsai wrote: > >> In D124287#3474369 , @jansvoboda11 >> wrote: >> >>> This sou

[PATCH] D128981: [C++20][Modules] Implement include translation.

2022-07-10 Thread Iain Sandoe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaf2d11b1d5c1: [C++20][Modules] Implement include translation. (authored by iains). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128981/new/ https://reviews

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-07-11 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D126189#3642762 , @JDevlieghere wrote: > This breaks TestDataFormatterLibcxxSpan.py on GreenDragon: > > Undefined symbols for architecture x86_64: > "__ZGIW10std_config", referenced from: > __GLOBAL__sub_I_main.cpp

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-07-11 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D126189#3642777 , @iains wrote: > In D126189#3642762 , @JDevlieghere > wrote: > >> This breaks TestDataFormatterLibcxxSpan.py on GreenDragon: >> >> Undefined symbols for architecture x

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-07-11 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D126189#3642779 , @JDevlieghere wrote: > In D126189#3642777 , @iains wrote: > >> In D126189#3642762 , @JDevlieghere >> wrote: >> >>> This break

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-07-11 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D126189#3642992 , @JDevlieghere wrote: > In D126189#3642820 , @iains wrote: > >> JFTR, I did not get any notification from green dragon (which is odd, AFAIR >> it's sent email before) o

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-07-11 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D126189#3643021 , @JDevlieghere wrote: > In D126189#3643001 , @iains wrote: > >> In D126189#3642992 , @JDevlieghere >> wrote: >> >>> In D126189

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-07-11 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. I need to do some more builds to be able to reproduce this - my guess (at present) is that this is a manifestation of '-fcxx-modules -std=c++20' being almost, but not exactly, the same as C++20 standardised modules. It is possible that the -gmodules flag interacts with t

<    1   2   3   4   5   >