[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation.

[clang] 52770d8 - [Serialization] Don't pack bits for the function scope index of ParmVarDecl

2023-12-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-28T11:04:11+08:00 New Revision: 52770d83bf00fc56e9496e32f083f0f940bf7315 URL: https://github.com/llvm/llvm-project/commit/52770d83bf00fc56e9496e32f083f0f940bf7315 DIFF: https://github.com/llvm/llvm-project/commit/52770d83bf00fc56e9496e32f083f0f940bf7315.diff

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2023-12-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I tried to fix this in https://github.com/llvm/llvm-project/commit/c2c840bd92cfac155f6205ff7505b109b301d389. Sorry for disturbing. https://github.com/llvm/llvm-project/pull/66801 ___ cfe-commits mailing list

[clang] c2c840b - [Modules] Don't prevent @import from ObjectiveC

2023-12-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-28T10:45:47+08:00 New Revision: c2c840bd92cfac155f6205ff7505b109b301d389 URL: https://github.com/llvm/llvm-project/commit/c2c840bd92cfac155f6205ff7505b109b301d389 DIFF: https://github.com/llvm/llvm-project/commit/c2c840bd92cfac155f6205ff7505b109b301d389.diff

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation.

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation ) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" ChuanqiXu9 wrote: Do we need the prefix? I am

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,15 @@ +// Test that -print-library-module-manifest-path finds the correct file. + +// RUN: %clang -print-library-module-manifest-path \ +// RUN: -stdlib=libc++ \ +// RUN: --sysroot=%S/Inputs/cxx23_modules \ +// RUN: --target=x86_64-linux-gnu 2>&1 \ +// RUN:

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation.

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -5280,6 +5280,9 @@ def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, def print_search_dirs : Flag<["-", "--"], "print-search-dirs">, HelpText<"Print the paths used for finding libraries and programs">, Visibility<[ClangOption, CLOption]>; +def

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-27 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. ChuanqiXu9 wrote:

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

2023-12-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I finally had time to debug this: The reason for modules being involved here > is because the serialization code calls `ParmVarDecl::getDefaultArg()` which > strips the outermost `FullExpr`, such as `ExprWithCleanups`. A potential fix > is in #76473 though I'm not really

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2023-12-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > https://reviews.llvm.org/D158694 The motivation of my change is that I find multiple people are trying to fake `import std` from clang modules. This is not wanted. So I tried to ban it. I'll try to fix it or revert it later today if I didn't.

[clang] 2203a4e - [NFC] [Serialization] Improve AST serialization by reordering packed

2023-12-21 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-21T16:35:20+08:00 New Revision: 2203a4e6e01ce6bfd69505420d304a81daf23dc9 URL: https://github.com/llvm/llvm-project/commit/2203a4e6e01ce6bfd69505420d304a81daf23dc9 DIFF: https://github.com/llvm/llvm-project/commit/2203a4e6e01ce6bfd69505420d304a81daf23dc9.diff

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

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

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

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

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once o… (PR #76119)

2023-12-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/76119 …f #import Close https://github.com/llvm/llvm-project/issues/73023 The direct issue of https://github.com/llvm/llvm-project/issues/73023 is that we entered a header which is marked as pragma once since the

[clang] 565e5e8 - Recommit [NFC] [Serialization] Packing more bits and refactor AbbrevToUse

2023-12-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-21T10:30:12+08:00 New Revision: 565e5e861f64f455ab789bc50840e0be2d33c417 URL: https://github.com/llvm/llvm-project/commit/565e5e861f64f455ab789bc50840e0be2d33c417 DIFF: https://github.com/llvm/llvm-project/commit/565e5e861f64f455ab789bc50840e0be2d33c417.diff

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,50 @@ +// REQUIRES: !system-windows + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: %clang_cc1 -std=c++20 %t/layer1.cppm -triple %itanium_abi_triple \ +// RUN: -emit-module-interface -o %t/foo-layer1.pcm +// RUN: %clang_cc1 -std=c++20

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From 908a0287e092ce7ac1865de32370ec3114b104ad Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH] [C++20] [Modules] [Itanium ABI] Generate the vtable in the

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,50 @@ +// REQUIRES: !system-windows + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: %clang_cc1 -std=c++20 %t/layer1.cppm -triple %itanium_abi_triple \ +// RUN: -emit-module-interface -o %t/foo-layer1.pcm +// RUN: %clang_cc1 -std=c++20

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,50 @@ +// REQUIRES: !system-windows + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: %clang_cc1 -std=c++20 %t/layer1.cppm -triple %itanium_abi_triple \ +// RUN: -emit-module-interface -o %t/foo-layer1.pcm +// RUN: %clang_cc1 -std=c++20

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,50 @@ +// REQUIRES: !system-windows + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: %clang_cc1 -std=c++20 %t/layer1.cppm -triple %itanium_abi_triple \ +// RUN: -emit-module-interface -o %t/foo-layer1.pcm +// RUN: %clang_cc1 -std=c++20

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,50 @@ +// REQUIRES: !system-windows + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: %clang_cc1 -std=c++20 %t/layer1.cppm -triple %itanium_abi_triple \ +// RUN: -emit-module-interface -o %t/foo-layer1.pcm +// RUN: %clang_cc1 -std=c++20

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

2023-12-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Yeah, it'll be much better if we had that feature. 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-19 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: #75894 > > Note that this leaves behind all who have hit "Subscribe" on this PR to keep > tabs on things (I wish Github provided a way to mark-as-duplicate and merge > the

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From 64296827cbba26fba0b5c0d2a6edfd966394cabc Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH] [C++20] [Modules] [Itanium ABI] Generate the vtable in the

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2023-12-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/75912 Close https://github.com/llvm/llvm-project/issues/70585 and reflect https://github.com/itanium-cxx-abi/cxx-abi/issues/170. The significant change of the patch is: for dynamic classes attached to module

[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

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