[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-12-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/71627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-12-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: As I summarized in https://discourse.llvm.org/t/rfc-c-20-modules-introduce-thin-bmi-and-decls-hash/74755/43, people are interested in this direction, but it may be too early for us to implement it. Let's postpone this. https://github.com/llvm/llvm-project/pull/71627

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

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

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

2023-12-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Since there is no meaningful review opinions here, let's continue it in a new and clean PR: https://github.com/llvm/llvm-project/pull/75894 https://github.com/llvm/llvm-project/pull/71622 ___ cfe-commits mailing list

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2023-12-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: My impression to the feedbacks is that every one of us loves the direction, while we may need more agreement on the user interfaces. To make it easier to review, I split all the user interfaces related part to following patches. So that the current patch won't affect users.

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-12-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping~ https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e55bda0 - [NFC] Fix the warning Wcovered-switch-default

2023-12-14 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-15T11:39:20+08:00 New Revision: e55bda06dc2bb1ef11ff4fcc43f90d8bf843f967 URL: https://github.com/llvm/llvm-project/commit/e55bda06dc2bb1ef11ff4fcc43f90d8bf843f967 DIFF: https://github.com/llvm/llvm-project/commit/e55bda06dc2bb1ef11ff4fcc43f90d8bf843f967.diff

[clang] 9cdb825 - [NFC] [Serialization] Packing more bits and refactor AbbrevToUse

2023-12-14 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-15T11:12:52+08:00 New Revision: 9cdb825a4f1bf9e75829d03879620c6144d0b7bc URL: https://github.com/llvm/llvm-project/commit/9cdb825a4f1bf9e75829d03879620c6144d0b7bc DIFF: https://github.com/llvm/llvm-project/commit/9cdb825a4f1bf9e75829d03879620c6144d0b7bc.diff

[clang] 2ce9a79 - [Serialization] Use packed bits to initialize UserDefinedLiteral

2023-12-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T18:24:09+08:00 New Revision: 2ce9a799f950678cef844706ecb55a483d3c225b URL: https://github.com/llvm/llvm-project/commit/2ce9a799f950678cef844706ecb55a483d3c225b DIFF: https://github.com/llvm/llvm-project/commit/2ce9a799f950678cef844706ecb55a483d3c225b.diff

[clang] 65b12a8 - Recommit [NFC] [Serialization] Packing more bits

2023-12-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T16:47:51+08:00 New Revision: 65b12a8af37ffa390ff45c8215904513eb75659e URL: https://github.com/llvm/llvm-project/commit/65b12a8af37ffa390ff45c8215904513eb75659e DIFF: https://github.com/llvm/llvm-project/commit/65b12a8af37ffa390ff45c8215904513eb75659e.diff

[clang] 9a46518 - Revert "[clang] Remove unused variable 'ExprDependenceBits' in ASTWriterDecl.cpp (NFC)"

2023-12-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T14:15:16+08:00 New Revision: 9a46518630869e7fcb495e72378abdbedf68d40d URL: https://github.com/llvm/llvm-project/commit/9a46518630869e7fcb495e72378abdbedf68d40d DIFF: https://github.com/llvm/llvm-project/commit/9a46518630869e7fcb495e72378abdbedf68d40d.diff

[clang] 8c33462 - Revert "[NFC] [Serialization] Packing more bits"

2023-12-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T14:06:32+08:00 New Revision: 8c334627818437180176b16b1932b2a26372d8ae URL: https://github.com/llvm/llvm-project/commit/8c334627818437180176b16b1932b2a26372d8ae DIFF: https://github.com/llvm/llvm-project/commit/8c334627818437180176b16b1932b2a26372d8ae.diff

[clang] 9406ea3 - [NFC] [Serialization] Packing more bits

2023-12-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T10:18:12+08:00 New Revision: 9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62 URL: https://github.com/llvm/llvm-project/commit/9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62 DIFF: https://github.com/llvm/llvm-project/commit/9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62.diff

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-12-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping! https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b768b39 - [C++20] [Modules] Skip Writing diagnostic options, header search paths and pragma diagnostic mappings

2023-12-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-07T16:54:00+08:00 New Revision: b768b393429419d27e3f76518842136bac9d5b25 URL: https://github.com/llvm/llvm-project/commit/b768b393429419d27e3f76518842136bac9d5b25 DIFF: https://github.com/llvm/llvm-project/commit/b768b393429419d27e3f76518842136bac9d5b25.diff

[clang] [C++20] [Modules] Enable -fmodules-embed-all-files by default for named modules (PR #74419)

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

[clang] [C++20] [Modules] Enable -fmodules-embed-all-files by default for named modules (PR #74419)

2023-12-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/74419 Close https://github.com/llvm/llvm-project/issues/72383 It looks incorrect or odd for the BMIs to dependent on the real files. It prevents we moving the BMIs and the distributed builds. And it looks like

[clang] db3d0e4 - [C++20] [Modules] Don't diagnose on invisible namesapce

2023-12-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-04T17:05:27+08:00 New Revision: db3d0e4dfa34e59fab90c0726a6722f82db48462 URL: https://github.com/llvm/llvm-project/commit/db3d0e4dfa34e59fab90c0726a6722f82db48462 DIFF: https://github.com/llvm/llvm-project/commit/db3d0e4dfa34e59fab90c0726a6722f82db48462.diff

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-12-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-28 Thread Chuanqi Xu via cfe-commits
@@ -129,14 +129,48 @@ static SmallString<32> buildSuspendPrefixStr(CGCoroData , AwaitKind Kind) { return Prefix; } -static bool memberCallExpressionCanThrow(const Expr *E) { - if (const auto *CE = dyn_cast(E)) -if (const auto *Proto = -

[clang] 649e811 - [C++20] [Modules] Handling capturing strucuted bindings

2023-11-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-11-29T11:45:31+08:00 New Revision: 649e8111a95ae0d8814576e9ca74823572ee404b URL: https://github.com/llvm/llvm-project/commit/649e8111a95ae0d8814576e9ca74823572ee404b DIFF: https://github.com/llvm/llvm-project/commit/649e8111a95ae0d8814576e9ca74823572ee404b.diff

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-28 Thread Chuanqi Xu via cfe-commits
@@ -129,14 +129,48 @@ static SmallString<32> buildSuspendPrefixStr(CGCoroData , AwaitKind Kind) { return Prefix; } -static bool memberCallExpressionCanThrow(const Expr *E) { - if (const auto *CE = dyn_cast(E)) -if (const auto *Proto = -

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM with nit. https://github.com/llvm/llvm-project/pull/73160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/73160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-27 Thread Chuanqi Xu via cfe-commits
@@ -129,7 +130,14 @@ static SmallString<32> buildSuspendPrefixStr(CGCoroData , AwaitKind Kind) { return Prefix; } -static bool memberCallExpressionCanThrow(const Expr *E) { +static bool ResumeExprCanThrow(const CoroutineSuspendExpr ) { + const Expr *E = S.getResumeExpr();

[clang-tools-extra] [clangd] Introduce reusable modules builder (PR #73483)

2023-11-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/73483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall I created https://github.com/llvm/llvm-project/pull/73483 as the following patches to reuse built module files. I think that patch should be necessary since the current patch may waste too many time and space since it won't reuse the module files across source

[clang-tools-extra] [clangd] Introduce reusable modules builder (PR #73483)

2023-11-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/73483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/66462 >From 32010ae7e0a47cd4a70a9401980b32ed1d3e10f6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 15 Sep 2023 11:33:53 +0800 Subject: [PATCH] [clangd] [C++20] [Modules] Introduce initial support for C++20

[clang] [clang][AST][ASTMerge] prevent AST nodes from being deallocated early (PR #73096)

2023-11-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Debug the https://github.com/llvm/llvm-project/issues/72783 can prove it. > Address interval (local from 0x3a9a00 to 0x3aaa00) allocated by allocator > contains a IdentifierInfo variable (local address:0x3aa190) whose address is > freed early. In this case, it looks

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-22 Thread Chuanqi Xu via cfe-commits
@@ -38,9 +39,52 @@ Task coro_create() { co_return; } -// CHECK-LABEL: define{{.*}} ptr @_Z11coro_createv( +// CHECK-LABEL: define{{.*}} ptr @_ZN9can_throw11coro_createEv( // CHECK: init.ready: // CHECK-NEXT: store i1 true, ptr {{.*}} -// CHECK-NEXT: call void

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-22 Thread Chuanqi Xu via cfe-commits
@@ -129,7 +130,14 @@ static SmallString<32> buildSuspendPrefixStr(CGCoroData , AwaitKind Kind) { return Prefix; } -static bool memberCallExpressionCanThrow(const Expr *E) { +static bool ResumeExprCanThrow(const CoroutineSuspendExpr ) { + const Expr *E = S.getResumeExpr();

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-22 Thread Chuanqi Xu via cfe-commits
@@ -12,9 +12,10 @@ #include "CGCleanup.h" #include "CodeGenFunction.h" -#include "llvm/ADT/ScopeExit.h" +#include "clang/AST/ExprCXX.h" #include "clang/AST/StmtCXX.h" #include "clang/AST/StmtVisitor.h" +#include "llvm/ADT/ScopeExit.h" ChuanqiXu9 wrote: Is

[clang] [Clang][Coroutines] Properly emit EH code for initial suspend `await_resume` (PR #73073)

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

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I'm still really hesitant about this direction. > > One starting concern: what happens if someone adds an overload, or other > interesting name resolution to the module? The downstream caller hasn't > textually changed, but it should be rebuilt because it should be calling

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-21 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/72956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-21 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/72956 >From 05453bc0da214ad69ab94d901c997c61fae86ab6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 17 Nov 2023 14:57:02 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Introduce a tool

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/72956 >From 05453bc0da214ad69ab94d901c997c61fae86ab6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 17 Nov 2023 14:57:02 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Introduce a tool

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/72956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/72956 >From 05453bc0da214ad69ab94d901c997c61fae86ab6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 17 Nov 2023 14:57:02 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Introduce a tool

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/72956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2023-11-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/72956 This patch introduces a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' to help the build systems to avoid compilations in modules.

[clang] [coroutines] Introduce [[clang::coro_lifetimebound]] (PR #72851)

2023-11-20 Thread Chuanqi Xu via cfe-commits
@@ -7483,7 +7483,6 @@ generation of the other destruction cases, optimizing the above `foo.destroy` to }]; } - ChuanqiXu9 wrote: nit: unnecessary changes. https://github.com/llvm/llvm-project/pull/72851 ___

[clang] [coroutines] Introduce [[clang::coro_lifetimebound]] (PR #72851)

2023-11-20 Thread Chuanqi Xu via cfe-commits
@@ -7580,10 +7580,15 @@ static void visitLifetimeBoundArguments(IndirectLocalPath , Expr *Call, if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) VisitLifetimeBoundArg(Callee, ObjectArg); + bool checkCoroCall = false; + if (const auto *RD =

[clang] [coroutines] Introduce [[clang::coro_lifetimebound]] (PR #72851)

2023-11-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Please wait for few days in case there are other comments. https://github.com/llvm/llvm-project/pull/72851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [coroutines] Introduce [[clang::coro_lifetimebound]] (PR #72851)

2023-11-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/72851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Please wait for 3~5 days in case @ilya-biryukov has more comments. https://github.com/llvm/llvm-project/pull/71945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 10ad98d - [NFC] [C++20] [Modules] Add a test from issue 71484

2023-11-16 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-11-16T16:05:46+08:00 New Revision: 10ad98dc160497699930f295dcb4c998ef561d2e URL: https://github.com/llvm/llvm-project/commit/10ad98dc160497699930f295dcb4c998ef561d2e DIFF: https://github.com/llvm/llvm-project/commit/10ad98dc160497699930f295dcb4c998ef561d2e.diff

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Chuanqi Xu via cfe-commits
@@ -7482,3 +7482,54 @@ generation of the other destruction cases, optimizing the above `foo.destroy` to }]; } + + +def CoroReturnTypeAndWrapperDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``coro_return_type`` attribute should be marked on a

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Chuanqi Xu via cfe-commits
@@ -7482,3 +7482,54 @@ generation of the other destruction cases, optimizing the above `foo.destroy` to }]; } + + +def CoroReturnTypeAndWrapperDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``coro_return_type`` attribute should be marked on a

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Chuanqi Xu via cfe-commits
@@ -300,6 +300,11 @@ Attribute Changes in Clang to reduce the size of the destroy functions for coroutines which are known to be destroyed after having reached the final suspend point. +- Clang now introduced ``[[clang::coro_return_type]]`` and

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Chuanqi Xu via cfe-commits
@@ -7482,3 +7482,54 @@ generation of the other destruction cases, optimizing the above `foo.destroy` to }]; } + + +def CoroReturnTypeAndWrapperDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``coro_return_type`` attribute should be marked on a

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-11-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: The key point now is the rationale why this change relates to modules. It looks not good to proceed without understanding this. Otherwise we're playing with a black box... And the concrete method, ..., well, I guess we had no choice but debugging it hardly. For example,

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Chuanqi Xu via cfe-commits
@@ -11591,6 +11591,10 @@ def err_conflicting_aligned_options : Error < def err_coro_invalid_addr_of_label : Error< "the GNU address of label extension is not allowed in coroutines." >; +def err_coroutine_return_type : Error< ChuanqiXu9 wrote: The intention

[clang] [clang] Make `-fvisibility={}` and `-ftype-visibility={}` benign options. (PR #71985)

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

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping~ https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Llvm modules on demand bmi (PR #71773)

2023-11-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > > > > Whether we re-use wrapper code or make some new code is an > > > > > > > implementation detail. > > > > > > > It does not actually prevent you from taking the two-phase > > > > > > > approach ( currently , --precompile will be unchanged in action). > > > > > >

[clang] Llvm modules on demand bmi (PR #71773)

2023-11-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > > Whether we re-use wrapper code or make some new code is an > > > > > implementation detail. > > > > > It does not actually prevent you from taking the two-phase approach ( > > > > > currently , --precompile will be unchanged in action). > > > > > > > > > > > > It

[clang] Llvm modules on demand bmi (PR #71773)

2023-11-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > Whether we re-use wrapper code or make some new code is an implementation > > > detail. > > > It does not actually prevent you from taking the two-phase approach ( > > > currently , --precompile will be unchanged in action). > > > > > > It doesn't prevent the

[clang] 0e7b30f - [C++20] [Modules] Enhance better diagnostic for implicit global module and module partitions

2023-11-09 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-11-10T10:58:07+08:00 New Revision: 0e7b30fa821dd4899227aa643030f4e4164f4e56 URL: https://github.com/llvm/llvm-project/commit/0e7b30fa821dd4899227aa643030f4e4164f4e56 DIFF: https://github.com/llvm/llvm-project/commit/0e7b30fa821dd4899227aa643030f4e4164f4e56.diff

[clang] Llvm modules on demand bmi (PR #71773)

2023-11-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > The proposition of the patches here is (in the most common general case) to > remove the step of generating the ImplementationBMI and to pipeline the > filtering to the AST consumer that generates the Interface BMI. Agreed. This is what I want too. > Whether we re-use

[clang] 0f7aaeb - [C++20] [Modules] Allow export from language linkage

2023-11-09 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-11-09T17:44:41+08:00 New Revision: 0f7aaeb3241c3803489a45753190e82dbc7fd5fa URL: https://github.com/llvm/llvm-project/commit/0f7aaeb3241c3803489a45753190e82dbc7fd5fa DIFF: https://github.com/llvm/llvm-project/commit/0f7aaeb3241c3803489a45753190e82dbc7fd5fa.diff

[clang] Llvm modules on demand bmi (PR #71773)

2023-11-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > clang++ -std=c++20 foo.cpp -c -fmodule-file=X=some/dir/X.pcm > > Hm, according to https://clang.llvm.org/docs/StandardCPlusPlusModules.html > this can already be achieved with the `-fmodule-output` option (and which I > was about to try in `build2`). Is there a reason a

[clang] Llvm modules on demand bmi (PR #71773)

2023-11-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > There are 2 things in the patch. One is to generate the BMI and the object > > file in one phase (phase here means preprocess, precompile, compile, ...). > > This is the main point of the patch - to do this efficiently. Got it. The we can be more focused. > > > But

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Oh, I didn't look into the identifier's system before. I took a while to look at the patch but I failed to understand it and I failed to find the relationships between this patch and header units... https://github.com/llvm/llvm-project/pull/71709

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-08 Thread Chuanqi Xu via cfe-commits
@@ -86,19 +87,26 @@ enum { IdentifierInfoAlignment = 8 }; static constexpr int ObjCOrBuiltinIDBits = 16; /// The "layout" of ObjCOrBuiltinID is: -/// - The first value (0) represents "not a special identifier". -/// - The next (NUM_OBJC_KEYWORDS - 1) values represent

[clang] 427f13b - [NFC] [C++20] [Modules] Remove 'ModuleInterface' bit in Sema::ModuleScope

2023-11-08 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-11-09T15:20:32+08:00 New Revision: 427f13bd724d332681ca5adb2455b7241af7177d URL: https://github.com/llvm/llvm-project/commit/427f13bd724d332681ca5adb2455b7241af7177d DIFF: https://github.com/llvm/llvm-project/commit/427f13bd724d332681ca5adb2455b7241af7177d.diff

[clang] [llvm] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

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

[clang] [llvm] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks for reviewing this! https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Llvm modules on demand bmi (PR #71773)

2023-11-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: This is a little bit far from what I imaged. There are 2 things in the patch. One is to generate the BMI and the object file in one phase (phase here means preprocess, precompile, compile, ...). Another is to allow us to generate BMI from a `.cpp` file. (Currently we only do

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/71014 >From 4531d8b95ecaf08e672939a49fa18415851d136e Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 2 Nov 2023 11:11:59 +0800 Subject: [PATCH 1/2] [Coroutines] Introduce

[clang] [llvm] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/71014 >From 4531d8b95ecaf08e672939a49fa18415851d136e Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 2 Nov 2023 11:11:59 +0800 Subject: [PATCH] [Coroutines] Introduce

[clang] [llvm] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > Presumably there should only be one spelling everywhere. > > > > > > Done > > Missed a few. ;-) Sorry and thanks for the detailed comment! https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-08 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 \ +// RUN: -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 \ +// RUN: -O3 -emit-llvm %s -o - | FileCheck %s

[clang] [llvm] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-08 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 \ +// RUN: -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 \ +// RUN: -O3 -emit-llvm %s -o - | FileCheck %s

[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-11-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Let's discuss the higher level problems in Let's discuss the higher level problems in https://discourse.llvm.org/t/rfc-c-20-modules-introduce-thin-bmi-and-decls-hash/74755. Especially this one is not good to review since we don't support stacked review now.

[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-11-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/71627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

2023-11-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Let's discuss the higher level problems in https://discourse.llvm.org/t/rfc-c-20-modules-introduce-thin-bmi-and-decls-hash/74755 https://github.com/llvm/llvm-project/pull/71622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-11-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/71627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-11-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/71627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-11-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/71627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

2023-11-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: The term `sparse` makes me wondering its format is not efficiency.. And for the term `surface`, ..., it may beyond my knowledge, I feel it is odd but I can't give a concrete reason. https://github.com/llvm/llvm-project/pull/71622

[clang] [C++20] [Modules] Bring Decls Hash to BMI for C++20 Module units (PR #71627)

2023-11-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/71627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

2023-11-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > It was suggested to avoid "thin" and "fat" terminology (I started using it > with LTO as a precedent for the terms), but I suppose something more > descriptive could be selected. Any suggestions? My english is not good, you know. > I'll also note that my prior usage was

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @bcardosolopes @apolloww @rjmccall would you like to take a look for the middle end part? https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > There is substantial inconsistency between "coro only destroy when complete" > and "... when done" throughout the PR (in various forms; e.g. literal > strings, snake_case, CamelCase, ALL_CAPS as well as file names). > > Presumably there should only be one spelling

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/71014 >From c69205d54e1a4858211b5bbce69e10bba7063359 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 2 Nov 2023 11:11:59 +0800 Subject: [PATCH] [Coroutines] Introduce

[clang] [C++20] [Modules] Don't import function bodies from other module units even with optimizations (PR #71031)

2023-11-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Sorry for being too hurry here. https://github.com/llvm/llvm-project/pull/71031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't import function bodies from other module units even with optimizations (PR #71031)

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

[clang] [C++20] [Modules] Don't import function bodies from other module units even with optimizations (PR #71031)

2023-11-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/71031 >From 82173f3556d40fc1c6e106820ad281b928a2c7fe Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 2 Nov 2023 15:19:58 +0800 Subject: [PATCH] [C++20] [Modules] Don't import function bodies from other module

[clang] [C++20] [Modules] Don't import function bodies from other module units even with optimizations (PR #71031)

2023-11-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/71031 >From 427c1e1960d48e8803e235b4d5beb437ea21c942 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 2 Nov 2023 15:19:58 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Don't import function bodies from other

[clang] d0c778c - [NFC] Remove unused member function 'Error' from PCHValidator

2023-11-06 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-11-07T14:13:33+08:00 New Revision: d0c778c882f117182f8a43d0f986cc8c2cfbb688 URL: https://github.com/llvm/llvm-project/commit/d0c778c882f117182f8a43d0f986cc8c2cfbb688 DIFF: https://github.com/llvm/llvm-project/commit/d0c778c882f117182f8a43d0f986cc8c2cfbb688.diff

[clang] [C++20] [Modules] Don't import function bodies from other module units even with optimizations (PR #71031)

2023-11-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this change later since the existing behavior violates our expectations for ABI. https://github.com/llvm/llvm-project/pull/71031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall gentle ping~ https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

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

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks for reviewing : ) https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From c841e9cbd9510c401def4d10df6da408ae496180 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 3 Nov 2023 21:54:25 +0800 Subject: [PATCH] [NFC] [Serializer] Pack information in serializer Previously,

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this in the next week if no objection come in. Since this may be safe. https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Modules] Fix ModuleDeclState transition when module is used as a regular identifier (PR #71134)

2023-11-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Thanks for looking into this. LGTM. https://github.com/llvm/llvm-project/pull/71134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

<    6   7   8   9   10   11   12   13   14   15   >