[clang] baa5b76 - [C++20] [Modules] Make module local decls visible to language linkage in the same module

2025-01-17 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-01-17T22:17:50+08:00 New Revision: baa5b769f2f76baa0ce1ebfe28236dee2c761f0d URL: https://github.com/llvm/llvm-project/commit/baa5b769f2f76baa0ce1ebfe28236dee2c761f0d DIFF: https://github.com/llvm/llvm-project/commit/baa5b769f2f76baa0ce1ebfe28236dee2c761f0d.diff LO

[clang] [C++20] [Modules] Makes sure internal declaration won't be found by other TU (PR #123059)

2025-01-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/123059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Makes sure internal declaration won't be found by other TU (PR #123059)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/123059 >From d0decfc63c2fef8ae659bc2133c6aee849ec19ae Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 15 Jan 2025 11:33:54 +0800 Subject: [PATCH] [C++20] [Modules] Makes sure internal declaration won't be foun

[clang] [C++20] [Modules] Support module level lookup (#122887) (PR #123281)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/123281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Support module level lookup (#122887) (PR #123281)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/123281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Support module level lookup (#122887) (PR #123281)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/123281 >From 0eb519b80b9923b5bd9e4697b4ccd92f6b9f2e8e Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 15 Jan 2025 15:15:35 +0800 Subject: [PATCH] [C++20] [Modules] Support module level lookup (#122887) Close h

[clang] [C++20] [Modules] Support module level lookup (#122887) (PR #123281)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/123281 Close https://github.com/llvm/llvm-project/issues/90154 This patch is also an optimization to the lookup process to utilize the information provided by `export` keyword. Previously, in the lookup process, t

[clang] [lldb] [AST] Add OriginalDC argument to ExternalASTSource::FindExternalVisibleDeclsByName (PR #123152)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/123152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [AST] Add OriginalDC argument to ExternalASTSource::FindExternalVisibleDeclsByName (PR #123152)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/123152 >From ea3eb4454319ce703bf689dac000f0ed382c2ee5 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 16 Jan 2025 11:30:30 +0800 Subject: [PATCH] [AST] Add OriginalDC argument to ExternalASTSource::FindExterna

[clang] [lldb] [AST] Add OriginalDC argument to ExternalASTSource::FindExternalVisibleDeclsByName (PR #123152)

2025-01-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Compile-time looks fine on this one: > https://llvm-compile-time-tracker.com/compare.php?from=8fb29ba287d72392bd7900c33d2a8d2149126dbe&to=fd734a392a094a573ee7fe587b9fc5f616f92a9a&stat=instructions:u Thanks. I'll land this after CI gets green. https://github.com/llvm/llvm-pr

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Looks like this change has some compile-time impact even if modules are not > > used: > > https://llvm-compile-time-tracker.com/compare.php?from=edc02351dd11cc4a39b7c541b26b71c6f36c8e55&to=7201cae106260aeb3e97d5291ff30f05076a&stat=instructions:u > > It seems to add ab

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
@@ -3118,18 +3120,27 @@ class AttrReader { return Reader.readVersionTuple(); } + void skipInts(unsigned N) { Reader.skipInts(N); } + + unsigned getCurrentIdx() { return Reader.getIdx(); } + OMPTraitInfo *readOMPTraitInfo() { return Reader.readOMPTraitInfo(); }

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/122726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
@@ -83,6 +83,9 @@ class ASTRecordReader /// Returns the current value in this record, without advancing. uint64_t peekInt() { return Record[Idx]; } + /// Returns the next value in this record, without advancing. + uint64_t peekNextInt() { return Record[Idx + 1]; } --

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM with nits. https://github.com/llvm/llvm-project/pull/122726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--fmodule-output` (PR #121046)

2025-01-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > @ChuanqiXu9 are you able to have a look? Sorry, I can't test and take a deeper look on windows. From https://discourse.llvm.org/t/driver-volunteer-wanted-for-modules-support-in-driver-for-mac-ubuntu-and-windows/83768/13, I think you can CC people there or calling again ther

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/122726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
@@ -3159,13 +3164,36 @@ Attr *ASTRecordReader::readAttr() { return New; } -/// Reads attributes from the current stream position. -void ASTRecordReader::readAttributes(AttrVec &Attrs) { +/// Reads attributes from the current stream position, advancing Idx. +/// For some attr

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
@@ -3240,6 +3244,7 @@ def PreferredName : InheritableAttr { let InheritEvenIfAlreadyPresent = 1; let MeaningfulToClassTemplateDefinition = 1; let TemplateDependent = 1; + let DeferDeserialization = 1; ChuanqiXu9 wrote: Maybe it is better to add comment

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
@@ -10079,6 +10079,11 @@ void ASTReader::finishPendingActions() { } PendingDeducedVarTypes.clear(); +// Load the delayed preferred name attributes. +for (unsigned I = 0; I != PendingDeferredAttributes.size(); ++I) + loadDeferredAttribute(PendingDeferredAtt

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
@@ -713,6 +713,10 @@ class Attr { // attribute may be documented under multiple categories, more than one // Documentation entry may be listed. list Documentation; + // Set to true if deserialization of this attribute must be deferred until + // the parent Decl is full

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: LGTM basically. https://github.com/llvm/llvm-project/pull/122726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [AST] Add OriginalDC argument to ExternalASTSource::FindExternalVisibleDeclsByName (PR #123152)

2025-01-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/123152 >From 3b3a9575f47c786db93fc0524d019fad5ef7cd61 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 16 Jan 2025 11:30:30 +0800 Subject: [PATCH] [AST] Add OriginalDC argument to ExternalASTSource::FindExterna

[clang] [lldb] [AST] Add OriginalDC argument to ExternalASTSource::FindExternalVisibleDeclsByName (PR #123152)

2025-01-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @nikic hi, could you test if this patch may trigger the compilation time regression? https://github.com/llvm/llvm-project/pull/123152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [lldb] [AST] Add OriginalDC argument to ExternalASTSource::FindExternalVisibleDeclsByName (PR #123152)

2025-01-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/123152 Part for relanding https://github.com/llvm/llvm-project/pull/122887. I split this to test where the performance regession comes from if modules are not used. >From 15e0af0c7a7f93a2f4fce6c996ef50726770a4ea M

[clang] 731db2a - Revert "[C++20] [Modules] Support module level lookup (#122887)"

2025-01-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-01-16T10:23:11+08:00 New Revision: 731db2a03e096fe42196f0ae6531179b998b0bf8 URL: https://github.com/llvm/llvm-project/commit/731db2a03e096fe42196f0ae6531179b998b0bf8 DIFF: https://github.com/llvm/llvm-project/commit/731db2a03e096fe42196f0ae6531179b998b0bf8.diff LO

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Looks like this change has some compile-time impact even if modules are not > used: > https://llvm-compile-time-tracker.com/compare.php?from=edc02351dd11cc4a39b7c541b26b71c6f36c8e55&to=7201cae106260aeb3e97d5291ff30f05076a&stat=instructions:u > It seems to add about 0.5%

[clang] [C++20] [Modules] Makes sure internal declaration won't be found by other TU (PR #123059)

2025-01-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/123059 Close https://github.com/llvm/llvm-project/issues/61427 And this is also helpful to implement https://github.com/llvm/llvm-project/issues/112294 partially. The implementation strategy mimics https://github.c

[clang] 2c34632 - [C++20] [Modules] [Driver] Support -print-library-module-manifest-path for libstdc++

2025-01-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-01-15T17:01:18+08:00 New Revision: 2c34632a9977a82ce6262d95f07addb772ba7014 URL: https://github.com/llvm/llvm-project/commit/2c34632a9977a82ce6262d95f07addb772ba7014 DIFF: https://github.com/llvm/llvm-project/commit/2c34632a9977a82ce6262d95f07addb772ba7014.diff LO

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -1205,6 +1205,23 @@ class ASTReader /// been completed. std::deque PendingDeclContextInfos; + /// Deserialization of some attributes must be deferred since they refer + /// to themselves in their type (e.g., preferred_name attribute refers to the + /// typedef that r

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Thanks. (1) Hardcoding is generally not good. And even if we have to, e.g., (we don't have an automatic mechanism to check if we need to defer an attribute), let's avoid hardcoding in both reader side and writer side. We can make this by adding a new b

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -1205,6 +1205,23 @@ class ASTReader /// been completed. std::deque PendingDeclContextInfos; + /// Deserialization of some attributes must be deferred since they refer + /// to themselves in their type (e.g., preferred_name attribute refers to the + /// typedef that r

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/122726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/122887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Now CI passes. I want to land this in 20.x and give it some baking times so that we can find issues in it if any. Post commit review comments are welcomed as always. https://github.com/llvm/llvm-project/pull/122887 ___ cfe-commits

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/122887 >From a259ccafe9b6f7efc740cd7203d44fd4170a25dc Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 26 Dec 2024 16:00:51 +0800 Subject: [PATCH] [C++20] [Modules] Support module level lookup Close https://git

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -145,12 +146,18 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. - /// \return \

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -145,12 +146,18 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. - /// \return \

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/122887 >From 0e49792900783f442da68b89fc3b4b3e013d18d3 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 26 Dec 2024 16:00:51 +0800 Subject: [PATCH] [C++20] [Modules] Support module level lookup Close https://git

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Thanks. This looks good to me. And please give @kadircet some time to give it a look. I'll try to land this in the next week if no more comments came in. https://github.com/llvm/llvm-project/pull/122606 __

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/122887 >From 3586c686980c3307856642c056caf572eb7ffe82 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 26 Dec 2024 16:00:51 +0800 Subject: [PATCH] [C++20] [Modules] Support module level lookup Close https://git

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -145,12 +146,17 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. + /// \param Na

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -2711,6 +2715,12 @@ class DeclContext { bool Deserialize = false) const; private: + /// Lookup all external visible declarations and the external declarations + /// within the same module specified by \param NamedModule. We can't Chuanq

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/122887 >From 0555df5f2bd726904e1ac21f44c9623aa057f831 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 26 Dec 2024 16:00:51 +0800 Subject: [PATCH] [C++20] [Modules] Support module level lookup Close https://git

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/122887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/122887 Close https://github.com/llvm/llvm-project/issues/90154 This patch is also an optimization to the lookup process to utilize the information provided by `export` keyword. Previously, in the lookup process, t

[clang] Fix print module manifest file for macos (PR #122370)

2025-01-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/122370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix print module manifest file for macos (PR #122370)

2025-01-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Should this be backported to older supported releases as well? (FWIW, I think > so.) But I am not sure if there is still release there. https://github.com/llvm/llvm-project/pull/122370 ___ cfe-commits mailing list cfe-commits@list

[clang] Fix print module manifest file for macos (PR #122370)

2025-01-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/acbd822879f7727127926c25e1b47f5017f962c5 https://github.com/llvm/llvm-project/pull/122370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [WIP] [Modules] Delay reading type source info of the preferred_name attribute. (PR #122250)

2025-01-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: A special handling for `PreferredName` looks slightly add-hoc to me. What I thought is to delay the deserialization of `attributes` after the deserialization of the declaration. If this is too optimistic, I am wondering if we can delay reading of some s

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Do we need to update `buildModuleFile` in `clang-tools-extra/clangd/ModulesBuilder.cpp` to update the commands to build the module interfaces? https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits m

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-12 Thread Chuanqi Xu via cfe-commits
@@ -9,6 +9,7 @@ /// FIXME: Skip testing on windows temporarily due to the different escaping /// code mode. +#include "llvm/ADT/StringRef.h" ChuanqiXu9 wrote: Move the include after the `#ifndef` https://github.com/llvm/llvm-project/pull/122606 _

[clang] Fix print module manifest file for macos (PR #122370)

2025-01-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/122370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix print module manifest file for macos (PR #122370)

2025-01-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/122370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix print module manifest file for macos (PR #122370)

2025-01-09 Thread Chuanqi Xu via cfe-commits
@@ -6380,6 +6380,11 @@ std::string Driver::GetFilePath(StringRef Name, const ToolChain &TC) const { if (llvm::sys::fs::exists(Twine(R))) return std::string(R); + SmallString<128> R2(ResourceDir); + llvm::sys::path::append(R2, "..", "..", Name); + if (llvm::sys::fs::e

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

2025-01-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Can you reduce your modules test case into a self contained project with > build system? > > If so, you can use [cvise](https://github.com/marxin/cvise) for reducing a > whole project directory recursively in one invocation. I didn't know this before. It sounds great. If y

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/1215

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: ChuanqiXu9 wrote: > Thanks for the review! Would you mind doing the merge? I do not

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -7230,6 +7230,9 @@ void ASTWriter::CompletedImplicitDefinition(const FunctionDecl *D) { if (!D->is

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/121550 ___

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 approved this pull request. LGTM now. We can land this after you fix the formatting issue.

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -6092,12 +6092,14 @@ void ASTWriter::WriteDeclUpdatesBlocks(ASTContext &Context, // An updated body is emitted last, so that the r

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 approved this pull request. LGTM with nits https://github.com/llvm/llvm-project/pull/121550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -6092,9 +6092,10 @@ void ASTWriter::WriteDeclUpdatesBlocks(ASTContext &Context, // An updated body is emitted last, so that the reader doesn't need // to skip over the lazy body to reach statements f

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -6092,9 +6092,10 @@ void ASTWriter::WriteDeclUpdatesBlocks(ASTContext &Context, // An updated body is emitted last, so that the reader doesn't need // to skip over the lazy body to reach statements f

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -6092,9 +6092,10 @@ void ASTWriter::WriteDeclUpdatesBlocks(ASTContext &Context, // An updated body is emitted last, so that the reader doesn't need // to skip over the lazy body to reach statements f

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Out of curiosity (not a blocking issue), why do you want this feature for > > C++20 modules? > > Sanitizers, linters and indexers have to deal with code using non supported > C++ language features or extensions. This is also true for C++20 modules. > While conceivably on

[clang] [clang-format] Add an option to control indentation of `export { ... }` (PR #110381)

2025-01-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @Sirraide hi are you still working on this? We observed similar issue recently. https://github.com/llvm/llvm-project/pull/110381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2025-01-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @jijjijj automated backport failed. You can create a PR to release/19.x manually to backport it. https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--fmodule-output` (PR #121046)

2025-01-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Why is this submitted against the release/19.x branch? Is this a backport? > > If so, please indicate which commit it backports. > > Not a backport but a new commit. I have now re-submitted it against `main`, > but I'd like it back-ported to `19.x` if possible. It is bet

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2025-01-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: It looks nice to backport this if we're still in the release circle for 19.x https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2025-01-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 9f1e9f682d0a85ea013ccbce6a3ec4ac1be8335 https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2025-01-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Oh, previously we didn't allow `-fallow-pcm-with-compiler-errors` so we didn't meet such problems. Out of curiosity (not a blocking issue), why do you want this feature for C++20 modules? https://github.com/llvm/llvm-project/pull/121550

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-05 Thread Chuanqi Xu via cfe-commits
@@ -6227,8 +6227,10 @@ void ASTWriter::WriteDeclUpdatesBlocks(ASTContext &Context, // Add a trailing update record, if any. These must go last because we // lazily load their attached statement. if (!GeneratingReducedBMI || !CanElideDeclDef(D)) { - if (HasUpda

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/121550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow generating module interfaces with parsing errors (PR #121485)

2025-01-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/121485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow generating module interfaces with parsing errors (PR #121485)

2025-01-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/121485 ___ 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)

2024-12-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > +1. It is best to have more test case. Generally I reduce it by hand in > > this case. > > Yeah, I did already spent quite a bit of effort trying to reduce the creduce > result by hand but have not been successful so far 😕. I'll try again and > report back. Would you sti

[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

2024-12-30 Thread Chuanqi Xu via cfe-commits
Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/104701 ___ cfe-commits mailing l

[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

2024-12-30 Thread Chuanqi Xu via cfe-commits
Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= Message-ID: In-Reply-To: ChuanqiXu9 wrote: You may want to add a note in ReleaseNotes too. And if you want to write a paper to WG21, please CC me or I'd love to be a co-author wit

[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

2024-12-30 Thread Chuanqi Xu via cfe-commits
Jan =?utf-8?q?Kokem=C3=BCller?= , Jan =?utf-8?q?Kokem=C3=BCller?= , Jan =?utf-8?q?Kokem=C3=BCller?= , Jan =?utf-8?q?Kokem=C3=BCller?= Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks https://github.com/llvm/llvm-project/pull/104701 __

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

2024-12-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited 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] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2024-12-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: +1. It is best to have more test case. Generally I reduce it by hand in this case. https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] 676b48d - [C++20] [Modules] Diagnose if import statement lakcs a semicolon

2024-12-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-12-25T17:45:28+08:00 New Revision: 676b48d1ccd8223bb0bd889cce13e6faecd20c6d URL: https://github.com/llvm/llvm-project/commit/676b48d1ccd8223bb0bd889cce13e6faecd20c6d DIFF: https://github.com/llvm/llvm-project/commit/676b48d1ccd8223bb0bd889cce13e6faecd20c6d.diff LO

[clang] 4b35dd5 - [Serialization] Try to clean up PendingUndeducedFunctionDecls when

2024-12-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-12-23T15:14:38+08:00 New Revision: 4b35dd57b88a59b169c3471cbc398113d3bf98e8 URL: https://github.com/llvm/llvm-project/commit/4b35dd57b88a59b169c3471cbc398113d3bf98e8 DIFF: https://github.com/llvm/llvm-project/commit/4b35dd57b88a59b169c3471cbc398113d3bf98e8.diff LO

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-12-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @ilya-biryukov I remember last time, the codes you shared to me actually based an open source project. I am wondering if you can open source some use for such projects (even for testing purpose). I think it will be pretty helpful to speedup the overall development process. h

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-12-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks for the long term waiting. https://github.com/llvm/llvm-project/pull/111992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang] Migrate away from PointerUnion::{is, get} (NFC) (PR #119654)

2024-12-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/119654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-11 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'll merge this directly since it looks like you don't have commit access. https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM then https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-12-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: I still feel it would be simpler to lookup the function for `await_suspend` in the awaiter and look for its return type. Then we don't need to care about the type of the expression. https://github.com/llvm/llvm-project/pull/85684 ___

[clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks. Given the change in lldb is trivial, I'd like to land it to see what happens. https://github.com/llvm/llvm-project/pull/119333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/119333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-12-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/114382 >From 8a90969b9b669fa2925cea2b60622c19406243d1 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 31 Oct 2024 17:27:00 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Convert '-fexperimental-modules-reduced-b

[clang] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-12-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I still find the current approach wrt the warning to be odd, we would > basically force every modules user to change their command line, either by > adding the new `-fmodules-reduced-bmi`, or add `-Wno-wathever` to suppress > the warning, or just learn to live with the warn

[clang] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-12-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/114382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-12-09 Thread Chuanqi Xu via cfe-commits
@@ -188,6 +189,7 @@ def parseScript(test, preamble): "%dbg(MODULE std) %{cxx} %{flags} " f"{compileFlags} " "-Wno-reserved-module-identifier -Wno-reserved-user-defined-literal " +"-fexperimental-modules-reduced-bmi "

  1   2   3   4   5   6   7   8   9   10   >