[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Michael Park via cfe-commits
mpark wrote: > > It turns out to be kind of a pain to use with HeaderFileInfoTrait. More > > importantly, we can't really afford to key by the internal key type since > > that only hashes on the size of the file and the hash collision gets pretty > > bad. Moreover, the merging and condensing s

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/140867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/140867 >From a82059f4e0953e327353f383c9728ef4a7a6eaac Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 20 May 2025 17:18:36 -0700 Subject: [PATCH] Lazily, but fully load 'HeaderFileInfo' table into memory. --- cl

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/140867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/140867 >From 1013ab2297935cc3a7eccf8a812984d9b454a27f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 20 May 2025 17:18:36 -0700 Subject: [PATCH] Lazily, but fully load 'HeaderFileInfo' table into memory. --- cl

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Michael Park via cfe-commits
https://github.com/mpark converted_to_draft https://github.com/llvm/llvm-project/pull/140867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Michael Park via cfe-commits
https://github.com/mpark created https://github.com/llvm/llvm-project/pull/140867 This is a WIP prototype in trying to solve #140860. The approach explored here is to fully load the on-disk hash tables in each of the PCMs into memory, so that we perform `N` (# of includes) hash table look-ups

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-14 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-11 Thread Michael Park via cfe-commits
mpark wrote: Synced with @ChuanqiXu9 offline about this. Summarizing the discussion so far: - There are some high-level concerns about the ecosystem, header units specifically. The complexity of the Clang interface and lack of support for header units. - At Meta we are starting to use header un

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: Going back to the idea of not writing the paths of imported PCMs at all; currently the condition to not write the paths is if the imported PCM is a named module. Perhaps this condition can be extended to omit the paths if the PCM was found through `-fmodule-file==`? https://gith

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: Actually, isn't this a problem even with `-fmodules-embed-all-files` for distributed caching purposes? I think the inputs files containing absolute paths would cause unnecessary cache misses. https://github.com/llvm/llvm-project/pull/135147

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: By the way @zygoloid, it looks like you reviewed https://reviews.llvm.org/D51568 which had a similar goal, back in 2018 that didn't get committed. Looks like `-fmodule-file-home-is-cwd` was added in 2022. https://github.com/llvm/llvm-project/pull/135147 ___

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/135147 >From 37a5c579d37d4314f79bcf77b7421bfbf61243aa Mon Sep 17 00:00:00 2001 From: Michael Park Date: Thu, 10 Apr 2025 02:01:07 -0700 Subject: [PATCH] Support '-fmodule-file-home-is-cwd' for C++ modules. '-fmodule-fil

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: > > But if we want relocatable modules without using > > `-fmodules-embed-all-files` though, is there a solution for that? > > Do you use `-no-canonical-prefixes`? Hi Richard! Hm, no we do not. I haven't seen this before. I can try it though 🤔 https://github.com/llvm/llvm-project

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/135147 >From 74e3f0ac74418b3aec2cabde0354623a92303ddc Mon Sep 17 00:00:00 2001 From: Michael Park Date: Thu, 10 Apr 2025 02:01:07 -0700 Subject: [PATCH] Support '-fmodule-file-home-is-cwd' for C++ modules. '-fmodule-fil

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: Separately, even with named modules, with or without `-fmodules-embed-all-files`, the `INPUT_FILE` paths in the PCM are still absolute. I guess with `-fmodules-embed-all-files` those paths are not used since the source files are embedded, which I suppose is how it avoids problems

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: > > > If you did `-fmodule-file==` for header units, I think it is > > > better to upstream that first. I think it is more fundamental. > > > > > > We don't do anything special downstream. As far as I know it already works > > today. > > If `-fmodule-file==` already works for he

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: Hm.. I'm not too sure about C++ named modules but for header units, the absolute path of an imported PCM via `-fmodule-file=` gets included in the produced PCM. I think that the `-fmodule-file-home-is-cwd` flag (already existing, I'm not proposing to add a new one) should be respe

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: > If you did `-fmodule-file==` for header units, I think it is > better to upstream that first. I think it is more fundamental. We don't do anything special downstream. As far as I know it already works today. https://github.com/llvm/llvm-project/pull/135147 _

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: Ah, interesting. It looks like indeed, this doesn't apply to C++ named modules. ``` // We don't want to hard code the information about imported modules // in the C++20 named modules. ``` https://github.com/llvm/llvm-project/blob/main/clang/lib/Serialization/ASTWriter.cpp

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark created https://github.com/llvm/llvm-project/pull/135147 '-fmodule-file-home-is-cwd' was added in https://github.com/llvm/llvm-project/commit/646e502de0d854cb3ecaca90ab52bebfe59a40cd to support relocatable PCMs for Clang modules. This PR extends the functionality to a

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Add a leading comment to boolean arguments. (PR #131746)

2025-03-19 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/131746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-18 Thread Michael Park via cfe-commits
@@ -4309,12 +4309,12 @@ Decl *ASTReader::ReadDeclRecord(GlobalDeclID ID) { void ASTReader::PassInterestingDeclsToConsumer() { assert(Consumer); - if (PassingDeclsToConsumer) + if (!CanPassDeclsToConsumer) return; // Guard variable to avoid recursively redoing the

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-18 Thread Michael Park via cfe-commits
@@ -10792,47 +10822,54 @@ void ASTReader::FinishedDeserializing() { --NumCurrentElementsDeserializing; if (NumCurrentElementsDeserializing == 0) { -// Propagate exception specification and deduced type updates along -// redeclaration chains. -// -// We do t

[clang] [NFC] Add a leading comment to boolean arguments. (PR #131746)

2025-03-18 Thread Michael Park via cfe-commits
https://github.com/mpark created https://github.com/llvm/llvm-project/pull/131746 Addressing [nit comments](https://github.com/llvm/llvm-project/pull/129982#discussion_r1997914387) from @shafik >From d8c4a3fe29bbd95d61d7b9c101912ae00b3d0c8a Mon Sep 17 00:00:00 2001 From: Michael Park Date: T

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-16 Thread Michael Park via cfe-commits
mpark wrote: Fixes #126973 https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-15 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-15 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-15 Thread Michael Park via cfe-commits
mpark wrote: Alright folks, I've finally figured this out! I'll describe the high-level problem, what's happening specifically in the test case, and the solution. # High-Level Problem [`ASTReader::FinishedDeserializing`](https://github.com/llvm/llvm-project/blob/release/20.x/clang/lib/Serializ

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
mpark wrote: > Thanks, the explanation and code change makes sense to me. ❤️ > Should this bugfix have a release note? I've added a couple of bullet points in the release notes. Please let me know if this is along the lines of what's expected. https://github.com/llvm/llvm-project/pull/129982

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark ready_for_review https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-11 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-11 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-10 Thread Michael Park via cfe-commits
@@ -10475,6 +10468,12 @@ void ASTReader::finishPendingActions() { for (auto *ND : PendingMergedDefinitionsToDeduplicate) getContext().deduplicateMergedDefinitonsFor(ND); PendingMergedDefinitionsToDeduplicate.clear(); + + // For each decl chain that we wanted to complet

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-09 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From 39b845fd64c2ce173b95ddcafbbab2d5116aa68e Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/2] [clang][modules] Add a unit test for the assertion failure in b

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-07 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
https://github.com/mpark converted_to_draft https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From 39b845fd64c2ce173b95ddcafbbab2d5116aa68e Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [lldb] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20][Modules] Do not update the generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20][Modules] Do not update the generation number if the redecl chain completion was delayed. (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-06 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
@@ -10178,12 +10178,12 @@ void ASTReader::visitTopLevelModuleMaps( } void ASTReader::finishPendingActions() { - while ( - !PendingIdentifierInfos.empty() || !PendingDeducedFunctionTypes.empty() || - !PendingDeducedVarTypes.empty() || !PendingIncompleteDeclChains.em

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested, if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; + // The external source may have additional definitions of this entity that are + // visi

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From 3f883067a2fda4147003de9a53b88e52c33d1280 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 25 Feb 2025 14:33:41 -0800 Subject: [PATCH 1/3] =?UTF-8?q?Reapply=20"[C++20][Modules][Serialization]?= =?UTF-8

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From 3f883067a2fda4147003de9a53b88e52c33d1280 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 25 Feb 2025 14:33:41 -0800 Subject: [PATCH 1/3] =?UTF-8?q?Reapply=20"[C++20][Modules][Serialization]?= =?UTF-8

[clang] Fix incomplete decl chains (PR #129982)

2025-03-05 Thread Michael Park via cfe-commits
https://github.com/mpark created https://github.com/llvm/llvm-project/pull/129982 None >From 3f883067a2fda4147003de9a53b88e52c33d1280 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 25 Feb 2025 14:33:41 -0800 Subject: [PATCH 1/3] =?UTF-8?q?Reapply=20"[C++20][Modules][Serialization]?= =

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-12 Thread Michael Park via cfe-commits
mpark wrote: Hi @zixu-w, thanks for the ping. I can't take a look this week, but can on Monday. It would be great if I can look at a small repro though. I'll follow on the issue. https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailin

[clang] [C++20][Modules][Serialization] Add an additional test case for #120277. (PR #126349)

2025-02-08 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/126349 >From eac633d78359245f1ce478b5f3cff26c6f5c858f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Fri, 7 Feb 2025 21:23:26 -0800 Subject: [PATCH 1/2] [C++20][Modules][Serialization] Add an additional test case for

[clang] [C++20][Modules][Serialization] Add an additional test case for #120277. (PR #126349)

2025-02-08 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/126349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Add an additional test case for #120277. (PR #126349)

2025-02-07 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/126349 >From eac633d78359245f1ce478b5f3cff26c6f5c858f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Fri, 7 Feb 2025 21:23:26 -0800 Subject: [PATCH] [C++20][Modules][Serialization] Add an additional test case for #12

[clang] [C++20][Modules][Serialization] Add an additional test case for #120277. (PR #126349)

2025-02-07 Thread Michael Park via cfe-commits
https://github.com/mpark created https://github.com/llvm/llvm-project/pull/126349 https://github.com/llvm/llvm-project/commit/4b35dd57b88a59b169c3471cbc398113d3bf98e8 was shipped to address https://github.com/llvm/llvm-project/issues/120277 . It was thought to be a regression in 19.x according

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-07 Thread Michael Park via cfe-commits
mpark wrote: /cherry-pick a9e249f64e800fbb20a3b26c0cfb68c1a1aee5e1 https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-07 Thread Michael Park via cfe-commits
mpark wrote: /cherry-pick a9e249f https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-07 Thread Michael Park via cfe-commits
https://github.com/mpark milestoned https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-03 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/121245 >From f1871418523dbd2915e4245e655d283114595730 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 28 Jan 2025 22:01:37 -0800 Subject: [PATCH 1/3] [C++20][Modules][Serialization] Add a unit test for #121245.

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Michael Park via cfe-commits
@@ -10483,6 +10476,13 @@ void ASTReader::finishPendingActions() { for (auto *ND : PendingMergedDefinitionsToDeduplicate) getContext().deduplicateMergedDefinitonsFor(ND); PendingMergedDefinitionsToDeduplicate.clear(); + + // For each decl chain that we wanted to complet

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/121245 >From f8d317ce75e51e467487cb10a89e44b73e6b386a Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 28 Jan 2025 22:01:37 -0800 Subject: [PATCH 1/3] [C++20][Modules][Serialization] Add a unit test for #121245.

  1   2   >