[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] [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: 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?=, 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: @@ -7230,6 +7230,9 @@ void ASTWriter::CompletedImplicitDefinition(const FunctionDecl *D) { if (!D->is

[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] [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] 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
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] [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] 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] [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] [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ü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] [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] [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] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-02-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. I like the idea. There are a lot of people suffering not able to send issue reports for modules. https://github.com/llvm/llvm-project/pull/124997 ___ cfe-commits mailing list cfe-commits@lists.

[clang] c5a9a72 - [C++20] [Modules] Don't diagnose duplicated friend declarations between modules incorrectly

2025-02-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-05T14:13:18+08:00 New Revision: c5a9a72b3cd118a23193d01bf9393fbf1d4b90ae URL: https://github.com/llvm/llvm-project/commit/c5a9a72b3cd118a23193d01bf9393fbf1d4b90ae DIFF: https://github.com/llvm/llvm-project/commit/c5a9a72b3cd118a23193d01bf9393fbf1d4b90ae.diff LO

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

2025-02-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Ready for review; all relevant tests passing. I think @rnk was saying you should add a test for this. https://github.com/llvm/llvm-project/pull/121046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

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

2025-02-08 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,67 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// RUN: cd %t ChuanqiXu9 wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/126349 ___ cfe-commits mailing list cfe-c

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

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

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

2025-02-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. It is easier to debug without `cd %t` generally. https://github.com/llvm/llvm-project/pull/126349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > instead of introducing a new concept of `ProjectModulesCache` and requiring > each `ProjectModules` implementation to know about it and work with it; what > about introducing a: > > ```c++ > class CachingProjectModules : public ProjectModules { > public: > CachingProjectM

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

2024-12-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,39 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/std.cppm -emit-module-interface -o %t/std.pcm +// RUN: %clang_cc1 -std=c++20 %t/mod.cppm -fprebuilt-module-path=%t -emit-module-interface -o %t/mod.pcm +// RUN

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

2024-12-09 Thread Chuanqi Xu via cfe-commits
@@ -803,6 +803,8 @@ Bug Fixes to C++ Support - Fixed an incorrect lambda scope of generic lambdas that caused Clang to crash when computing potential lambda captures at the end of a full expression. (#GH115931) - Clang no longer rejects deleting a pointer of incomplete enume

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

2024-12-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: LGTM with nits 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-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited 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
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] [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] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-12-09 Thread Chuanqi Xu via cfe-commits
@@ -172,6 +172,7 @@ def parseScript(test, preamble): f"{compileFlags} " "-Wno-reserved-module-identifier -Wno-reserved-user-defined-literal " "-fmodule-file=std=%T/std.pcm " # The std.compat module imports std. +

[clang] [lldb] [Serialization] Support load lazy specialization lazily (PR #119333)

2024-12-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/119333 >From bccd73362a411ef6652100f987843aa18dfb8085 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 6 Dec 2024 10:31:37 +0800 Subject: [PATCH] [Serialization] Support load lazy specialization lazily Currentl

[clang] [lldb] [Serialization] Support load lazy specialization lazily (PR #119333)

2024-12-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited 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] [lldb] [Serialization] Support load lazy specialization lazily (PR #119333)

2024-12-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/119333 Reland https://github.com/llvm/llvm-project/pull/83237 --- Currently all the specializations of a template (including instantiation, specialization and partial specializations) will be loaded at once if we

[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 "

[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
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] [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] [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] [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] [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] 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] [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] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-12-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I see, so because we no longer allow inconsistent options when importing, > > we now issue a lot of error diagnostics. But for many of the options, > > differences between TUs should have no impact on modules anyway, and so > > those errors are false positives. Is that ab

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

2024-12-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited 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][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The overall idea looks good. But the implementation may be improved. I didn't look at the implementation of std module in MSVC. But I am guess it is because the clang compiler failed to skip the transparent `export` or `language linkage` context. If y

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

2024-12-03 Thread Chuanqi Xu via cfe-commits
@@ -11919,8 +11919,12 @@ bool Sema::isStdInitializerList(QualType Ty, QualType *Element) { CXXRecordDecl *TemplateClass = Template->getTemplatedDecl(); if (TemplateClass->getIdentifier() != &PP.getIdentifierTable().get("initializer_list") || -!getSt

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

2024-12-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited 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] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-12-04 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @ldionne @mordante ping~ 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] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-12-04 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Some other thoughts about false-positive error diagnostics. I am wondering, > > if we don't want false-positive error diagnostics at all, then we have to > > do what I proposed in this PR (to downgrade errors to warnings for > > inconsistent flags). Otherwise, we can alwa

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

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

[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] 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] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/123931 >From d83d7bd83cd6bd635420ec4e824afa299f20c154 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 22 Jan 2025 11:41:55 +0800 Subject: [PATCH] [C++20] [Modules] Fix may-be incorrect ADL for module local ent

[clang] [C++20] [Modules] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/123931 Close https://github.com/llvm/llvm-project/issues/123815 See the comments for details >From 17ca1bba5b7ff23abaf3694e19ee63df9f85069a Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 22 Jan 2025 11:41:55

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

2025-01-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed 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] d2e5103 - [C++20] [Modules] Correct the visibility of decls in implicit global module of other units in the same TU

2025-01-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-01-22T17:24:12+08:00 New Revision: d2e510360fc9b17a3ad536582f076795c4c37634 URL: https://github.com/llvm/llvm-project/commit/d2e510360fc9b17a3ad536582f076795c4c37634 DIFF: https://github.com/llvm/llvm-project/commit/d2e510360fc9b17a3ad536582f076795c4c37634.diff LO

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

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

[clang] [C++20] [Modules] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I'm not seeing any impact: > https://llvm-compile-time-tracker.com/compare.php?from=ff0f1dd341cb2fdc1281a14413b3aa93bf9a20c7&to=4bfdd091675b9957686ac81457629e124950dc25&stat=instructions:u Thank you! https://github.com/llvm/llvm-project/pull/123931 _

[clang] [C++20] [Modules] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/123931 >From d83d7bd83cd6bd635420ec4e824afa299f20c154 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 22 Jan 2025 11:41:55 +0800 Subject: [PATCH] [C++20] [Modules] Fix may-be incorrect ADL for module local ent

[clang] [clang][Modules] Raise empty.modulemap expected size to <70KB to fix RISC-V failure (PR #123959)

2025-01-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. CC @Bigcheese But I think the patch itself is good to go. Let's avoid breaking the CI. https://github.com/llvm/llvm-project/pull/123959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [C++20] [Modules] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this given the scale of the patch and I want to fix it before 20.x and I may not be available in the next few days. https://github.com/llvm/llvm-project/pull/123931 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [C++20] [Modules] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/123931 ___ 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-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Given @kadircet is approved and @petr-polezhaev is marked as `first-time contributor`, I'll merge this by assuming you don't have the commit access. https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits mailing list cfe-co

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

2025-01-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @petr-polezhaev please update the mail address. We don't like github.reply mail address. https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [C++20] [Modules] Make sure vtable are generated for explicit template instantiation definition (PR #123871)

2025-01-21 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/123871 Close https://github.com/llvm/llvm-project/issues/123719 The reason is, we thought the external explicit template instantiation declaration as the external definition incorrectly. >From 77cc683b9e0330baf089

[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] 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
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] [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] 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-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-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] [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] [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
@@ -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
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
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
@@ -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] 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-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] [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] [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] 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] [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] [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
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] [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 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] [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

<    16   17   18   19   20   21   22   23   24   >