Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

iains (Iain Sandoe)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 16 2014, 4:54 AM (481 w, 4 d)

Recent Activity

Oct 3 2023

iains abandoned D126691: ASTContext: Provide a query for module initializer contents..

although this was approved, we did not need to use it to implement the dependent changes.

Oct 3 2023, 1:27 AM · Restricted Project, Restricted Project
iains abandoned D158769: [libc++abi] Handle null pointer-to-object [PR64593].

this is now
https://github.com/llvm/llvm-project/pull/68076

Oct 3 2023, 1:26 AM · Restricted Project, Restricted Project

Sep 11 2023

iains added a comment to D158769: [libc++abi] Handle null pointer-to-object [PR64593].

sorry I did not get to moving this yet - but will try during this week.

Sep 11 2023, 3:17 PM · Restricted Project, Restricted Project

Sep 2 2023

iains added a comment to D158769: [libc++abi] Handle null pointer-to-object [PR64593].

Since we are moving to GitHub PRs and there hasn't been any activity here yet, could you move this patch over?

Sep 2 2023, 8:59 AM · Restricted Project, Restricted Project

Aug 26 2023

iains published D158769: [libc++abi] Handle null pointer-to-object [PR64593] for review.

Some background since it is relevant to the testing done so far.

Aug 26 2023, 10:38 AM · Restricted Project, Restricted Project

Jul 14 2023

iains added a comment to D155245: [MC][AsmParser] Diagnose improperly nested .cfi frames.

on the subject of is there any way to diagnose:

  • if we encounter either a linker-visible or global symbol after a cfi_startproc but before the next cfi_endproc [in the same section], that would seem to indicate bad nesting?
  • I suppose that there could be some weird code-gen that multiplexed the output between sections, so seeing a section switch before the closing cfi_endproc is not sufficient
Jul 14 2023, 12:45 AM · Restricted Project, Restricted Project

Jul 4 2023

iains added a comment to D126694: [C++20][Modules] Implementation of GMF decl elision..

Yes, that was the decision at the last time we looked - because removing decls would degrade this - if we have new information that changes our preferred design, then fine.

I remember the major reason for the last time to not remove the decls are that the design of AST doesn't support to remove decls. And my current idea is, we can refuse to write the discardable Decls into the BMIs.

Jul 4 2023, 12:55 AM · Restricted Project, Restricted Project, Restricted Project

Jul 3 2023

iains added a comment to D126694: [C++20][Modules] Implementation of GMF decl elision..

That is clearly a big motivation - I will ask the folks we were talking to at WG21 if that is their priority - or maybe they care about language isolation etc.

Yeah, I know the folks in WG21 prefer the language isolation. But you know, there are many folks who are not in WG21...

Jul 3 2023, 11:59 PM · Restricted Project, Restricted Project, Restricted Project
iains added a comment to D126694: [C++20][Modules] Implementation of GMF decl elision..

BTW, in my experience for talking about modules to users, they mainly/mostly care about the compilation performance. And I can't image how many people would like to use modules if they know they won't get a compilation performance win.

Jul 3 2023, 11:50 PM · Restricted Project, Restricted Project, Restricted Project
iains added a comment to D126694: [C++20][Modules] Implementation of GMF decl elision..

Now I think the feature may be important for the performance of modules. And I feel we should work on the ASTWriter side instead of ASTReader side. Since the size of BMIs is a problem now also it shows that it is not free to load the large BMIs. So while it is semantical correct to work on the reader side, it is better for the performance to work on the writer side.

I'd like to finish the idea. And for the current patch, I'd like to refactor it a little bit:

  1. Test it by unittest instead of by matching the dump result.
Jul 3 2023, 11:28 PM · Restricted Project, Restricted Project, Restricted Project

Jul 1 2023

iains planned changes to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

changes are needed to address review comments - but this revision is needed as a parent to other work (so might need to be rebased from time to time)

Jul 1 2023, 4:16 AM · Restricted Project, Restricted Project
iains updated the diff for D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

rebased, fixed some format issues; again to support p1815 work only.

Jul 1 2023, 4:14 AM · Restricted Project, Restricted Project

Jun 30 2023

iains updated the diff for D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

just rebased to support p1815 work

Jun 30 2023, 3:29 PM · Restricted Project, Restricted Project

Jun 26 2023

iains planned changes to D153542: [C++20][Modules] Implement P2615R1 exported specialization diagnostics..

need to re-check that the intention of the paper is covered (since we currently treat bare 'export' and 'export {}' in a similar manner).

Jun 26 2023, 11:36 PM · Restricted Project, Restricted Project
iains added inline comments to D153542: [C++20][Modules] Implement P2615R1 exported specialization diagnostics..
Jun 26 2023, 6:36 AM · Restricted Project, Restricted Project

Jun 25 2023

iains committed rGb37233a253f3: [C++20][Modules] Complete implementation of module.import p7. (authored by iains).
[C++20][Modules] Complete implementation of module.import p7.
Jun 25 2023, 8:30 AM · Restricted Project, Restricted Project
iains closed D152746: [C++20][Modules] Complete implementation of module.import p7..
Jun 25 2023, 8:29 AM · Restricted Project, Restricted Project

Jun 24 2023

iains committed rGe5c7904fa0bf: [C++20][Modules] Implement P2615R1 revised export diagnostics. (authored by iains).
[C++20][Modules] Implement P2615R1 revised export diagnostics.
Jun 24 2023, 1:03 AM · Restricted Project, Restricted Project
iains closed D152946: [C++20][Modules] Implement P2615R1 revised export diagnostics..
Jun 24 2023, 1:02 AM · Restricted Project, Restricted Project

Jun 22 2023

iains updated the diff for D152746: [C++20][Modules] Complete implementation of module.import p7..

rebased and fixed some formatting.

Jun 22 2023, 9:33 AM · Restricted Project, Restricted Project
iains published D153542: [C++20][Modules] Implement P2615R1 exported specialization diagnostics. for review.

I think it is a good idea to keep this part of P2615R1 separate from the unnamed exports diagnostics [the parent commit] - it seems likely that there will be more fallout from this (given that there were already PRs about the behaviour of exported specialisations).

Jun 22 2023, 6:12 AM · Restricted Project, Restricted Project
iains added a comment to D152946: [C++20][Modules] Implement P2615R1 revised export diagnostics..

not sure why the debian CI is reported clang-format errors; I am not seeing them here.

Jun 22 2023, 4:25 AM · Restricted Project, Restricted Project
iains updated the diff for D152946: [C++20][Modules] Implement P2615R1 revised export diagnostics..

rebased, addressed review comments.

Jun 22 2023, 4:20 AM · Restricted Project, Restricted Project

Jun 21 2023

iains added a comment to D152946: [C++20][Modules] Implement P2615R1 revised export diagnostics..
Jun 21 2023, 1:08 PM · Restricted Project, Restricted Project

Jun 19 2023

iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

It is a case that we have supported; the user puts in a use of a decl but forgets to import the module exporting it (I agree it is not _exactly_ a "typo" in terms of names, but the diagnostics counts it in the same way)

I got your point. But I prefer to implement an all-visible mode (not available for users) for such situations. And I still think it is not problem for the special case. Since this is patch is working for internal decls.

Jun 19 2023, 2:14 AM · Restricted Project, Restricted Project
iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

I will look at the rest of the comments once back in the office.

Jun 19 2023, 1:36 AM · Restricted Project, Restricted Project
iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

if we do not adjust the typo fixes, we will regress diagnostics.

What the kind of diagnostics will be regressed? I mean, it looks weird to me that we suggest typo fixes from hidden names.

Jun 19 2023, 1:08 AM · Restricted Project, Restricted Project

Jun 14 2023

iains published D152946: [C++20][Modules] Implement P2615R1 revised export diagnostics. for review.

thanks to Daniela Engert for reporting this and helping identify the current WG21 status on the topic.

Jun 14 2023, 12:31 PM · Restricted Project, Restricted Project

Jun 12 2023

iains added a comment to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.

BTW, there is a case that I am not sure if it is valid about module linkage.

// Part1.cppm
export module TheMod:Part1;
int loog = 1;

// Part2.cppm
export module TheMod:Part2;
int loog = 2;

// TheMod.cppm
export module TheMod;
export import :Part1;
export import :Part2;

int loog = 3;
export int V = loog;

Here all the loog have modules linkage. And is this case an ODR violation or not?

Jun 12 2023, 11:32 PM · Restricted Project
iains updated the diff for D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

rebased, added testcase for Issue 61601.

Jun 12 2023, 11:27 PM · Restricted Project, Restricted Project
iains added a comment to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.

Hopefully, we can combine them to resolve both the issue and the lookup blocker.

(didn't start to look at the code yet)

I feel like we can't solve https://github.com/llvm/llvm-project/issues/61601 without touching the deserializer.

// Part1.cppm
export module TheMod:Part1;
static int loog = 1;

// Part2.cppm
export module TheMod:Part2;
static int loog = 2;

// TheMod.cppm
export module TheMod;
export import :Part1;
export import :Part2;

static int loog = 3;
export int V = loog;

I feel the compiler will still emit the ODR violation issue.

Jun 12 2023, 10:54 PM · Restricted Project
iains added a comment to D150023: [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other module unit.

although I would welcome input from the ABI owners, testing shows that this patch does appear to DTRT and brings clang in line with the operation of GCC in this area. It would be good to land it (or decide what other action is needed) before 17 branches

Jun 12 2023, 1:04 PM · Restricted Project, Restricted Project, Restricted Project
iains published D152746: [C++20][Modules] Complete implementation of module.import p7. for review.

many thanks to Daniela Engert from bringing this to my attention (and providing a reproducer test case).

Jun 12 2023, 12:51 PM · Restricted Project, Restricted Project

Jun 9 2023

iains added a comment to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.

It would be good to do so - but we need to make sure that the workaround does not break any of the cases (esp. the ADL in instantiation).

Yeah, this is the problem. It looks like my solution in brain would break the ADL example you gave. But I am not sure if your lookup patch could solve https://github.com/llvm/llvm-project/issues/61807.

Jun 9 2023, 2:07 AM · Restricted Project
iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

about the comments that the patch seems to do multiple things; I do not think we can fix the lookup without touching the typo-fixes since it uses the same underlying machinery - if we do not adjust the typo fixes, we will regress diagnostics.

Jun 9 2023, 1:36 AM · Restricted Project, Restricted Project
iains added a comment to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.

We are talking highly related but different things. My first point is on the product/user level.

I think the current status is:

  • Clang17 is going to be branched and there is a significant issue we haven't solved yet.
  • We have a potential workaround for the issue. But the workaround is incorrect for some not-working-yet cases.
  • Also the workaround would affect some other important and big feature implementations (your works). And if we decide to wait for such implementations, we're highly possible not able to get up for clang17 to fix the issues. One the one hand, we need spend a lot of time to test and review it.
Jun 9 2023, 1:27 AM · Restricted Project
iains updated the diff for D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

rebased and adjusted for upstream changes

Jun 9 2023, 1:02 AM · Restricted Project, Restricted Project
iains added a comment to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.

BTW, I am generally very uncomfortable with making the deserialisation process do more of the Sema work.

Jun 9 2023, 1:00 AM · Restricted Project
iains added a comment to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.

Actually, P1815 is almost complete (95%+ in the current patch and i am currently looking at the lambda) however P1815 is ultimately blocked by this (lookup) issue; That is, P1815 is not a solution to the lookup problem - for it to work lookup has to be fixed.

Jun 9 2023, 12:57 AM · Restricted Project

May 24 2023

iains added inline comments to D150023: [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other module unit.
May 24 2023, 3:54 AM · Restricted Project, Restricted Project, Restricted Project
iains added a comment to D150023: [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other module unit.

This looks reasonable to me - but the vtable stuff is not an area that I am familiar with, so I'll defer to the other reviewers.

May 24 2023, 12:54 AM · Restricted Project, Restricted Project, Restricted Project

Apr 6 2023

iains added inline comments to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..
Apr 6 2023, 2:34 AM · Restricted Project, Restricted Project
iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

in the end, we have to deal with the following cases:

Apr 6 2023, 2:14 AM · Restricted Project, Restricted Project
iains updated the diff for D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

rebased, addressed review comments (patch still needs refactoring)

Apr 6 2023, 2:08 AM · Restricted Project, Restricted Project

Apr 2 2023

iains added inline comments to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..
Apr 2 2023, 9:56 PM · Restricted Project, Restricted Project
iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

I updated this because I am going to push the latest version of the P1815 patch and that depends on the lookup changes.

Apr 2 2023, 8:48 PM · Restricted Project, Restricted Project
iains updated the diff for D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

rebased

Apr 2 2023, 8:44 PM · Restricted Project, Restricted Project

Mar 31 2023

iains added inline comments to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.
Mar 31 2023, 1:35 AM · Restricted Project

Mar 29 2023

iains added inline comments to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.
Mar 29 2023, 10:05 AM · Restricted Project

Mar 28 2023

iains added inline comments to D126959: [C++20][Modules] Introduce an implementation module..
Mar 28 2023, 8:29 PM · Restricted Project, Restricted Project
iains committed rG6e4f870a21e3: re-land [C++20][Modules] Introduce an implementation module. (authored by iains).
re-land [C++20][Modules] Introduce an implementation module.
Mar 28 2023, 8:23 PM · Restricted Project, Restricted Project
iains closed D126959: [C++20][Modules] Introduce an implementation module..
Mar 28 2023, 8:23 PM · Restricted Project, Restricted Project
iains updated the diff for D126959: [C++20][Modules] Introduce an implementation module..

rebased, retested.

Mar 28 2023, 7:52 AM · Restricted Project, Restricted Project
iains accepted D146986: Downgrade reserved module identifier error into a warning.
Mar 28 2023, 5:27 AM · Restricted Project, Restricted Project
iains added a comment to D146986: Downgrade reserved module identifier error into a warning.

+1 for this as an interim solution.

Mar 28 2023, 5:26 AM · Restricted Project, Restricted Project

Mar 27 2023

iains added a comment to D126959: [C++20][Modules] Introduce an implementation module..

It took me a while to get my local macOS based devt. environment to reproduce the problem - but it was as expected; the implementation module was unowned and nothing was deleting it.

Mar 27 2023, 7:58 AM · Restricted Project, Restricted Project
iains updated the diff for D126959: [C++20][Modules] Introduce an implementation module..

rebased, reworked to have the module owned.

Mar 27 2023, 7:55 AM · Restricted Project, Restricted Project
iains reopened D126959: [C++20][Modules] Introduce an implementation module..

I had a hunch that the issue was the non-ownership of the implementation module.

Mar 27 2023, 7:54 AM · Restricted Project, Restricted Project

Mar 26 2023

iains added a comment to D126959: [C++20][Modules] Introduce an implementation module..

This seem to case problems when building with asan enabled (LLVM_USE_SANITIZER='Address'):

Mar 26 2023, 8:22 PM · Restricted Project, Restricted Project

Mar 24 2023

iains planned changes to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

although this patch does handle the cases needed, it really needs refactoring.
posting here since we are both working in this area and this might be useful input.

Mar 24 2023, 12:21 AM · Restricted Project, Restricted Project
iains updated the diff for D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

rebased, split the changes to module and private linkage out,

Mar 24 2023, 12:19 AM · Restricted Project, Restricted Project

Mar 23 2023

iains committed rGc6e9823724ef: [C++20][Modules] Introduce an implementation module. (authored by iains).
[C++20][Modules] Introduce an implementation module.
Mar 23 2023, 5:48 AM · Restricted Project, Restricted Project
iains closed D126959: [C++20][Modules] Introduce an implementation module..
Mar 23 2023, 5:48 AM · Restricted Project, Restricted Project

Mar 22 2023

iains added inline comments to D126959: [C++20][Modules] Introduce an implementation module..
Mar 22 2023, 4:01 PM · Restricted Project, Restricted Project
iains updated the diff for D126959: [C++20][Modules] Introduce an implementation module..

rebased, addressed review comments, and amended the description.

Mar 22 2023, 3:57 PM · Restricted Project, Restricted Project
iains added a comment to D146614: [C++20] [Modules] Don't make internal entities visible to lookups from other units.

I agree it is complex

  • I think it needs more than is in this patch
  • and there are different rules applied during lookup for typos (which I have had to handle specially, otherwise we get useless suggestions)
Mar 22 2023, 3:49 AM · Restricted Project

Mar 19 2023

iains committed rG62a16d5e2069: [C++2x][Modules] Amend module purview constant linkage [P2788R0]. (authored by iains).
[C++2x][Modules] Amend module purview constant linkage [P2788R0].
Mar 19 2023, 9:26 AM · Restricted Project, Restricted Project
iains closed D145886: [C++2x][Modules] Amend module purview constant linkage [P2788R0]..
Mar 19 2023, 9:26 AM · Restricted Project, Restricted Project
iains updated the diff for D145886: [C++2x][Modules] Amend module purview constant linkage [P2788R0]..

rebased.

Mar 19 2023, 4:37 AM · Restricted Project, Restricted Project

Mar 17 2023

iains added a comment to D126959: [C++20][Modules] Introduce an implementation module..

General comments (at least my opinion).

Mar 17 2023, 2:07 AM · Restricted Project, Restricted Project

Mar 16 2023

iains added a comment to D126959: [C++20][Modules] Introduce an implementation module..

This was originally created (and @ChuanqiXu approved) for the work on module initialisers. I did not apply it then, since it was possible to determine the correct state for the initialisers without it.

Mar 16 2023, 3:42 AM · Restricted Project, Restricted Project
iains updated the diff for D126959: [C++20][Modules] Introduce an implementation module..

rebased, and reworked for changes in main.

Mar 16 2023, 3:36 AM · Restricted Project, Restricted Project

Mar 15 2023

iains added a comment to D144844: [C++20] [Modules] Offer -fno-import-inter-module-function-defs to avoid duplicated compilation in modules.

However, "performance" also includes compilation speed in the 'no optimisation, debug' case - that is also considered very important. So, perhaps, the short-term approach should be (as @dblaikie suggested) to include the bodies for -O >= 3?

I don't think so. I think "performance" refers to the runtime performance generally. I don't believe the normal users will be happy if modules will decrease the performance of their program in any means. So I think we should include the bodies by default.

Mar 15 2023, 2:15 PM · Restricted Project, Restricted Project, Restricted Project
iains added a comment to D144844: [C++20] [Modules] Offer -fno-import-inter-module-function-defs to avoid duplicated compilation in modules.

Got your points. Let's postpone this one.

But I want to emphasize that this patch (and the thin PCM) will decrease the performance. While LTO can save the regression, LTO is not widely used. (ThinLTO can only mitigate this.) I mean the default behavior shouldn't cause performance regression. We can offer a new alternative for the users but we can't enable that by default simply now.

Mar 15 2023, 12:35 AM · Restricted Project, Restricted Project, Restricted Project

Mar 14 2023

iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..
Mar 14 2023, 2:01 PM · Restricted Project, Restricted Project
iains added a comment to D144844: [C++20] [Modules] Offer -fno-import-inter-module-function-defs to avoid duplicated compilation in modules.

Seem to recall @iains and others were concerned about the number of modules flags - this one I'd be inclined to suggest we shouldn't add if possible. If one way or the other is generally better - we should, at least initially, dictate that behavior entirely until someone can demonstrate divergent use cases that seem reasonable to support but must have different behavior here.

Mar 14 2023, 10:29 AM · Restricted Project, Restricted Project, Restricted Project
iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..
Mar 14 2023, 2:33 AM · Restricted Project, Restricted Project
iains added a comment to D145965: [C++20][Modules] Fix incorrect visibilities in implementation units..

Yeah, it is indeed a problem that Sema::isModuleUnitOfCurrentTU doesn't work for implementation units. And I have been thinking about this for a while. My thought is that the root cause may be that we shouldn't push the module interface to Sema::ModuleScopes() for the implementation unit. (We need some other small refactoring).

Mar 14 2023, 1:59 AM · Restricted Project, Restricted Project
iains published D145965: [C++20][Modules] Fix incorrect visibilities in implementation units. for review.
Mar 14 2023, 12:32 AM · Restricted Project, Restricted Project

Mar 13 2023

iains published D145886: [C++2x][Modules] Amend module purview constant linkage [P2788R0]. for review.

I should definitely check to make sure that this was adopted as a DR against C++20 (otherwise we would need to use the previous test conditionally on < 2b).

Mar 13 2023, 6:15 AM · Restricted Project, Restricted Project

Mar 2 2023

iains accepted D144367: [C++20] [Modules] Support to export declarations in the language linkage .

OK, I guess one extra sub-module is not too bad.
LGTM.

Mar 2 2023, 11:43 AM · Restricted Project, Restricted Project

Feb 28 2023

iains added a comment to D144367: [C++20] [Modules] Support to export declarations in the language linkage .

@iains ping~ I want to land this one in the next week if no comments come in.

I will try to review during this week.

One quick question : does the revised module layout work OK with "-module-file-info" which should print the summary of the C++20 content in the first few lines.

Yeah, I've added the test for it.

Feb 28 2023, 1:03 AM · Restricted Project, Restricted Project

Feb 27 2023

iains added a comment to D144367: [C++20] [Modules] Support to export declarations in the language linkage .

@iains ping~ I want to land this one in the next week if no comments come in.

Feb 27 2023, 7:14 AM · Restricted Project, Restricted Project

Feb 20 2023

iains added a comment to D144367: [C++20] [Modules] Support to export declarations in the language linkage .

OK - the visibility path is already complex, we do not need to make it more so.
I guess you are intending to rebase/update this?

Feb 20 2023, 11:55 PM · Restricted Project, Restricted Project
iains added a comment to D144367: [C++20] [Modules] Support to export declarations in the language linkage .

I am wondering why we need to add another sub-module.

Feb 20 2023, 3:48 PM · Restricted Project, Restricted Project

Feb 2 2023

iains committed rGcdd44e2c8554: [C++20][Modules] Handle template declarations in header units. (authored by iains).
[C++20][Modules] Handle template declarations in header units.
Feb 2 2023, 2:51 AM · Restricted Project, Restricted Project
iains closed D142704: [C++20][Modules] Handle template declarations in header units..
Feb 2 2023, 2:51 AM · Restricted Project, Restricted Project

Jan 31 2023

iains added inline comments to D142704: [C++20][Modules] Handle template declarations in header units..
Jan 31 2023, 3:12 AM · Restricted Project, Restricted Project
iains updated the diff for D142704: [C++20][Modules] Handle template declarations in header units..

rebased, added tests for instantiated variable/function templates.

Jan 31 2023, 3:12 AM · Restricted Project, Restricted Project

Jan 30 2023

iains added a comment to D142704: [C++20][Modules] Handle template declarations in header units..

I think we need to find a way to proceed - because this causes a regression on the llvm-16 branch, and that should be resolved soon, if possible.
What is your suggestion for a way forward?

Jan 30 2023, 11:52 PM · Restricted Project, Restricted Project
iains added a comment to D142704: [C++20][Modules] Handle template declarations in header units..

I think we need to find a way to proceed - because this causes a regression on the llvm-16 branch, and that should be resolved soon, if possible.
What is your suggestion for a way forward?

Jan 30 2023, 11:47 PM · Restricted Project, Restricted Project

Jan 29 2023

iains added a comment to D142704: [C++20][Modules] Handle template declarations in header units..

AFAICT the failing test is unrelated to this patch.

Jan 29 2023, 10:04 AM · Restricted Project, Restricted Project

Jan 28 2023

iains added a comment to D142704: [C++20][Modules] Handle template declarations in header units..

tried the patch and it seems to work with libstdc++ but not with libc++

<SNIP>
> rm -rf .xmake build; xmake f --toolchain=clang --cxxflags="-stdlib=libc++"; xmake b                                                                                               
checking for platform ... linux
checking for architecture ... x86_64
<SNIP>
[ 88%]: compiling.release src/main.cpp
error: /usr/bin/../include/c++/v1/ostream:254:20: error: 'std::basic_ostream<char>::operator<<' from module '/usr/bin/../include/c++/v1/complex' is not present in definition of 'std::ostream' in module '/usr/bin/../include/c++/v1/iostream'
    basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
                   ^
/usr/bin/../include/c++/v1/ostream:221:20: note: declaration of 'operator<<' does not match
    basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
                   ^
<SNIP>

using namespace std;

int main(int argc, char** argv)
{
    cout << "hello world!" << endl;
    return 0;
}
Jan 28 2023, 12:10 PM · Restricted Project, Restricted Project
iains added a comment to D142704: [C++20][Modules] Handle template declarations in header units..

in my local testing, I was able to consume all libc++ headers individually.

Jan 28 2023, 9:59 AM · Restricted Project, Restricted Project
iains updated the diff for D142704: [C++20][Modules] Handle template declarations in header units..

rebased, and revised to handle variable templates and instantiations.

Jan 28 2023, 9:53 AM · Restricted Project, Restricted Project

Jan 27 2023

iains planned changes to D142704: [C++20][Modules] Handle template declarations in header units..

this is necessary, but not sufficient (I need to make additions) .. no need to review yet.

Jan 27 2023, 8:38 AM · Restricted Project, Restricted Project
iains published D142704: [C++20][Modules] Handle template declarations in header units. for review.

@dblaikie - I suspect that this would be useful on the llvm-16 release branch, and so I've added you as a reviewer, if you have some chance to look ..
(I do not think @ChuanqiXu is available until February).

Jan 27 2023, 4:19 AM · Restricted Project, Restricted Project

Jan 22 2023

iains committed rG53a1314ed1b5: [C++20][Modules] Fix named module import diagnostics. (authored by iains).
[C++20][Modules] Fix named module import diagnostics.
Jan 22 2023, 2:23 AM · Restricted Project, Restricted Project
iains closed D140927: [C++20][Modules] Fix named module import diagnostics..
Jan 22 2023, 2:23 AM · Restricted Project, Restricted Project

Jan 21 2023

iains committed rGff70e22f08d9: [C++20][Modules] Handle defaulted and deleted functions in header units. (authored by iains).
[C++20][Modules] Handle defaulted and deleted functions in header units.
Jan 21 2023, 4:57 AM · Restricted Project, Restricted Project