[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

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

[clang] 6345b00 - [C++20] [Modules] Add mangling number for lambda in non-internal module unit context

2025-03-13 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-13T15:04:06+08:00 New Revision: 6345b009c3e58a6cd0eca835d5a935f8784cfda6 URL: https://github.com/llvm/llvm-project/commit/6345b009c3e58a6cd0eca835d5a935f8784cfda6 DIFF: https://github.com/llvm/llvm-project/commit/6345b009c3e58a6cd0eca835d5a935f8784cfda6.diff LO

[clang] [C++20] [Modules] Instantiate pending instantiations when GMF ends (PR #126842)

2025-02-19 Thread Chuanqi Xu via cfe-commits
@@ -1104,9 +1104,13 @@ void Sema::ActOnStartOfTranslationUnit() { } void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) { - // No explicit actions are required at the end of the global module fragment. - if (Kind == TUFragmentKind::Global) + if (Kind == TUFrag

[clang] [clang] Improve module out of date error message (PR #128103)

2025-02-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: would you like to add a test? https://github.com/llvm/llvm-project/pull/128103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 24c06a1 - [C++20] [Modules] handling selectAny attribute for vardecl

2025-02-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-21T10:48:30+08:00 New Revision: 24c06a19be7bcf28b37e5eabbe65df95a2c0265a URL: https://github.com/llvm/llvm-project/commit/24c06a19be7bcf28b37e5eabbe65df95a2c0265a DIFF: https://github.com/llvm/llvm-project/commit/24c06a19be7bcf28b37e5eabbe65df95a2c0265a.diff LO

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Adding metadata to an instruction should never be required for correctness > > I figured the existing use and the fact that it only needs to survive until > CoroSplit made it good enough. But you're right, we should do better. > > I do think we need an explicit way to tel

[clang] 366dadd - [Serialization] Update DECL_LAST

2025-02-24 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-25T13:30:30+08:00 New Revision: 366daddfad9aa38ebb7d40055cf65f4ecb7dd6f9 URL: https://github.com/llvm/llvm-project/commit/366daddfad9aa38ebb7d40055cf65f4ecb7dd6f9 DIFF: https://github.com/llvm/llvm-project/commit/366daddfad9aa38ebb7d40055cf65f4ecb7dd6f9.diff LO

[clang] [clang] Improve module out of date error message (PR #128103)

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

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > In the issue (#127499) you pointed out that this issue applies to the MSVC > > ABI where all parameters are destroyed in the callee. Is it reasonable to > > construct the analogous test case in that environment? > > Yes, in fact the reproducer on that issue will trigger u

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

2025-02-25 Thread Chuanqi Xu via cfe-commits
@@ -6097,10 +6097,29 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, } llvm::PrettyStackTraceString CrashInfo("Computing output path"); + // Output to a user requested destination? if (AtTopLevel && !isa(JA) && !isa(JA)) { -if (Arg

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

2025-02-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I hope to backport this to 20.x. It shouldn't be riskful given the modules support in clangd is controlled by an "experiment" option. https://github.com/llvm/llvm-project/pull/125988 ___ cfe-commits mailing list cfe-commits@lists.llv

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

2025-02-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/ae839b02504a68a0dfe63ac8ec314d9d7a6ce8df https://github.com/llvm/llvm-project/pull/125988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

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

2025-02-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/125988 ___ 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] Add scanning cache (PR #125988)

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

[clang] e3f5269 - [NFC] [C++20] [Modules] Add a test for no transitive changes

2025-02-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-27T18:51:39+08:00 New Revision: e3f52690c796baca241a6771d897adc6670a1ed8 URL: https://github.com/llvm/llvm-project/commit/e3f52690c796baca241a6771d897adc6670a1ed8 DIFF: https://github.com/llvm/llvm-project/commit/e3f52690c796baca241a6771d897adc6670a1ed8.diff LO

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > > > While I may not able to look into them in detail recently, it may > > > > > > be helpful to split this into seperate patches to review and to > > > > > > land. > > > > > > > > > > > > > > > I initially considered this, but @vgvassilev said in > > > > > [root-pro

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Maybe you can test it with this and land it with different patches. So that > > we can revert one of them if either of them are problematic but other parts > > are fine. > > I'm ok with pushing the commits one-by-one after the PR is reviewed, just let > me know. > > > >

[clang] [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-04-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Let it go. https://github.com/llvm/llvm-project/pull/132214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 80f216d - [C++20] [Modules] Add a test

2025-03-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-27T14:04:41+08:00 New Revision: 80f216db530eda98a444bc1994c7d69a7107c3c6 URL: https://github.com/llvm/llvm-project/commit/80f216db530eda98a444bc1994c7d69a7107c3c6 DIFF: https://github.com/llvm/llvm-project/commit/80f216db530eda98a444bc1994c7d69a7107c3c6.diff LO

[clang] [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-04-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: LGTM. But I didn't recognize you didn't update `MultiplexExternalSemaSource`. Every time we add new interface to `ExternalASTSource`, we need to update `MultiplexExternalSemaSource` too. https://github.com/llvm/llvm-project/pull/132214

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

2025-05-11 Thread Chuanqi Xu via cfe-commits
@@ -14,3 +14,11 @@ //--- test.pcm // CPP20WARNING-NOT: clang-cl: warning: argument unused during compilation: '/std:c++20' [-Wunused-command-line-argument] + +// test whether the following outputs %Hello.bmi +// RUN: %clang_cl /std:c++20 --precompile -x c++-module -fmodule-o

[clang] 2d81994 - [NFC] Add test from issue 61125

2025-05-06 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-05-07T14:47:24+08:00 New Revision: 2d81994c4a41b950eed9bdee189cba9d00381b58 URL: https://github.com/llvm/llvm-project/commit/2d81994c4a41b950eed9bdee189cba9d00381b58 DIFF: https://github.com/llvm/llvm-project/commit/2d81994c4a41b950eed9bdee189cba9d00381b58.diff LO

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-05-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I just got a case: ``` class A { public: class B { public: B(A *); // some non static data fields }; B b(this); }; ``` Does this a valid prove that this optimization is not valid ? https://github.com/llvm/llvm-project/pull/136792 __

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-05-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Hi, this is my first contribution in LLVM. I would like to know ho many > approves needed and is there anything else needed on my side? Thanks! I think they just forgot to check if you have the write access. I think this is good to merge if you fixed the CI or make sure it

[clang] [lld] [llvm] [polly] Fix regression tests with bad FileCheck checks (PR #140373)

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

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > ### Performance measurements with LLVM > I tested these patches for building LLVM itself with modules > (`LLVM_ENABLE_MODULES=ON`). To work around #130795, I apply #131354 before > building Clang. In terms of overall performance for the entire build, I'm not > able to measu

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: BTW, I don't mind landing the rest 3 patches since they are "verified". https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Clang][CodeGen] Do not emit lifetime intrinsics for coro promise alloca (PR #140548)

2025-05-19 Thread Chuanqi Xu via cfe-commits
@@ -1599,9 +1599,14 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { bool IsMSCatchParam = D.isExceptionVariable() && getTarget().getCXXABI().isMicrosoft(); + // No lifetime intrinsics on coroutine promise alloca, or middle end + // passes wi

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

2025-05-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Sorry, I don't remember seeing that discussion, and I'm probably missing lots > of modules context. As a counter argument, clang-cl uses `/Yc` and `/Fp` to > generate PCH files, to match MSVC's interface although the file format is > different. > > More importantly, it fee

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

2025-05-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > @zmodem given how important this it, I hope we can make this for clang21. > > Thanks! > > I'm just a reviewer here, and I still find the patch very confusing. Not asking for an approval. It is just a ping : ) > > And taking a step back, the whole point of clang-cl is to

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

2025-05-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Is `-Fo` even relevant here? The BMI output name comes from `-ifcOutput` (or > `-fmodule-output=`). Consumption of external modules doesn't need an object, > so it would only use `-fmodule-output=`. > > > Sorry, I don't remember seeing that discussion > > See this thread:

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

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

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

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

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-14 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > @emaxx-google, @ilya-biryukov, do you think we can move forward even though > don't have a reproducer yet? It feels we are stuck on that one case on a > downstream client -- worst case maybe the devs can work it around by changing > source code for that one case? Yes, I'm

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

2025-05-21 Thread Chuanqi Xu via cfe-commits
@@ -6831,43 +6832,60 @@ std::optional ASTReader::isPreprocessedEntityInFileID(unsigned Index, return false; } -namespace { - - /// Visitor used to search for information about a header file. - class HeaderFileInfoVisitor { - FileEntryRef FE; -std::optional HFI; - -

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

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

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

2025-05-21 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: > It turns out to be kind of a pain to use with HeaderFileInfoTrait. More > importantly, we can't really afford to key by the internal key type since > that only hashes on the size of the file and the hash collision gets pretty > bad. Moreover, the mer

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

2025-05-21 Thread Chuanqi Xu via cfe-commits
@@ -654,6 +654,10 @@ class ASTReader /// Map from the TU to its lexical contents from each module file. std::vector> TULexicalDecls; + unsigned HeaderFileInfoIdx = 0; ChuanqiXu9 wrote: And also, this seems unsafe since ModuleManager can remove modules te

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

2025-05-21 Thread Chuanqi Xu via cfe-commits
@@ -654,6 +654,10 @@ class ASTReader /// Map from the TU to its lexical contents from each module file. std::vector> TULexicalDecls; + unsigned HeaderFileInfoIdx = 0; ChuanqiXu9 wrote: nit: Unloaded header file info idx. And also I feel the name is odd.

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

2025-05-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @mathstuf in https://github.com/llvm/llvm-project/issues/140825#issuecomment-2900112555 , xmake dev said he can fix the problem by `/clang:-o`. I am wondering if you can did similar thing in CMake if there is an argument? https://github.com/llvm/llvm-project/pull/121046

[clang] [clang] Mark some language options as benign. (PR #131569)

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

[clang] [clang] Mark some language options as benign. (PR #131569)

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

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -195,6 +196,10 @@ class ExternalASTSource : public RefCountedBase { /// module. virtual bool wasThisDeclarationADefinition(const FunctionDecl *FD); + virtual bool hasInitializerWithSideEffects(const VarDecl *VD) const { ChuanqiXu9 wrote: Generally, e

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -1442,6 +1442,10 @@ class ASTReader const StringRef &operator*() && = delete; }; + /// VarDecls with initializers containing side effects must be emitted, + /// but DeclMustBeEmitted is not allowed to deserialize the intializer. + llvm::SmallPtrSet InitSideEffectVa

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -1632,6 +1632,10 @@ RedeclarableResult ASTDeclReader::VisitVarDeclImpl(VarDecl *VD) { VD->NonParmVarDeclBits.PreviousDeclInSameBlockScope = VarDeclBits.getNextBit(); +bool HasInitWithSideEffect = VarDeclBits.getNextBit(); +if (HasInitWithSideEffect) +

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -2434,6 +2434,31 @@ VarDecl *VarDecl::getInitializingDeclaration() { return Def; } +bool VarDecl::hasInitWithSideEffects() const { + if (!hasInit()) +return false; + + // Check if we can get the initializer without deserializing + const Expr *E = nullptr; + if (au

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: I just found I forgot pushing pending comments. https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -2434,6 +2434,31 @@ VarDecl *VarDecl::getInitializingDeclaration() { return Def; } +bool VarDecl::hasInitWithSideEffects() const { + if (!hasInit()) +return false; + + // Check if we can get the initializer without deserializing + const Expr *E = nullptr; + if (au

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

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

[clang] 50c5ecd - [NFC] [Serialization] Remove a useless comment

2025-06-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-20T10:33:35+08:00 New Revision: 50c5ecd35402dc734f2a462df5532e77a5ce12b2 URL: https://github.com/llvm/llvm-project/commit/50c5ecd35402dc734f2a462df5532e77a5ce12b2 DIFF: https://github.com/llvm/llvm-project/commit/50c5ecd35402dc734f2a462df5532e77a5ce12b2.diff LO

[clang] [clang] NFC: introduce UnsignedOrNone as a replacement for std::optional (PR #134142)

2025-06-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Just noticed that this is not using `std::optional`. If this is good, why don't we put this to `llvm/ADT`? I feel that is a better place. https://github.com/llvm/llvm-project/pull/134142 ___ cfe-commits mailing list cfe-commits@lists

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-06-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Lifetimes are very important and crucial. I suggest you to abstract your algorithm and send it to https://discourse.llvm.org/ for wider visibility. https://github.com/llvm/llvm-project/pull/144319 ___ cfe-commi

[clang] 0fe78c4 - [NFC] [Serialization] Some Code Cleanups for Name lookup table things

2025-06-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-19T17:54:07+08:00 New Revision: 0fe78c4a290517925acc03d59f235926f440f155 URL: https://github.com/llvm/llvm-project/commit/0fe78c4a290517925acc03d59f235926f440f155 DIFF: https://github.com/llvm/llvm-project/commit/0fe78c4a290517925acc03d59f235926f440f155.diff LO

[clang] 14e89b0 - [C++20] [Modules] Add exported modules as transitive imported modules

2025-06-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-20T17:03:29+08:00 New Revision: 14e89b061fdecedcec4bb035060a56588610cb5c URL: https://github.com/llvm/llvm-project/commit/14e89b061fdecedcec4bb035060a56588610cb5c DIFF: https://github.com/llvm/llvm-project/commit/14e89b061fdecedcec4bb035060a56588610cb5c.diff LO

[clang] fccc6ee - [C++20] [Modules] Don't make enum constant members always visible

2025-06-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-23T14:39:08+08:00 New Revision: fccc6ee7021811a27ab1303d19407f703853ab92 URL: https://github.com/llvm/llvm-project/commit/fccc6ee7021811a27ab1303d19407f703853ab92 DIFF: https://github.com/llvm/llvm-project/commit/fccc6ee7021811a27ab1303d19407f703853ab92.diff LO

[clang] [clang][clang-scan-deps] Add named modules to format 'experimental-full' (PR #145221)

2025-06-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: I don't feel bad but I'd like to leave the formal approvals to @jansvoboda11 and @Bigcheese here. https://github.com/llvm/llvm-project/pull/145221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

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

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-23 Thread Chuanqi Xu via cfe-commits
@@ -2434,6 +2434,31 @@ VarDecl *VarDecl::getInitializingDeclaration() { return Def; } +bool VarDecl::hasInitWithSideEffects() const { + if (!hasInit()) +return false; + + // Check if we can get the initializer without deserializing + const Expr *E = nullptr; + if (au

[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

2025-06-24 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: The design is, the higher 32 bits are used for module file index and the lower bits are used for offsets. Could you give a concrete example why the current implementation is problematic? https://github.com/llvm/llvm-project/pull/145529 ___

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

2025-06-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > If modules are considered as system headers in clang-tidy, there was work in > #128150 to reduce scope of traversal to match only in user code (I suppose it > would affect modules too). But that PR had to be reverted due to appeared > issues with downstream users. Hopefully

[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

2025-06-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > The design is, the higher 32 bits are used for module file index and the > > lower bits are used for offsets. Could you give a concrete example why the > > current implementation is problematic? > > I don’t have a concrete failure case, but I noticed this while working on

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-25 Thread Chuanqi Xu via cfe-commits
@@ -8,470 +8,966 @@ Debugging C++ Coroutines Introduction -For performance and other architectural reasons, the C++ Coroutines feature in -the Clang compiler is implemented in two parts of the compiler. Semantic -analysis is performed in Clang, and Coroutine cons

[clang] 4efb618 - [C++20] [Modules] Handling template declare with debug info

2025-06-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-25T17:51:50+08:00 New Revision: 4efb61850b590941a8da51057d3a63782864f44c URL: https://github.com/llvm/llvm-project/commit/4efb61850b590941a8da51057d3a63782864f44c DIFF: https://github.com/llvm/llvm-project/commit/4efb61850b590941a8da51057d3a63782864f44c.diff LO

[clang] a0ce3e6 - [C++20] [Modules] Avoid crash with calls to (this auto) syntax

2025-06-24 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-25T14:12:32+08:00 New Revision: a0ce3e691c199145b55b6a7f86468b438eb14264 URL: https://github.com/llvm/llvm-project/commit/a0ce3e691c199145b55b6a7f86468b438eb14264 DIFF: https://github.com/llvm/llvm-project/commit/a0ce3e691c199145b55b6a7f86468b438eb14264.diff LO

[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

2025-06-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Yeah, and for what it worth, maybe you want to take a look at: https://discourse.llvm.org/t/rfc-c-modules-stop-using-abbrev-and-drop-the-maintainance/87063/2 https://github.com/llvm/llvm-project/pull/145529 ___ cfe-commits mailing li

[clang] [Serialization] Remove delta encoding optimization (PR #145670)

2025-06-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Maintainability is important given the limited dev resources right now. https://github.com/llvm/llvm-project/pull/145670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

2025-06-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Sorry. I failed to understand the problem. In what case, may the encoder produce up to 33 bits? https://github.com/llvm/llvm-project/pull/145529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-25 Thread Chuanqi Xu via cfe-commits
@@ -8,470 +8,966 @@ Debugging C++ Coroutines Introduction -For performance and other architectural reasons, the C++ Coroutines feature in -the Clang compiler is implemented in two parts of the compiler. Semantic -analysis is performed in Clang, and Coroutine cons

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

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

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

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

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: The direction meets my expectation. I think you already have an existing test for swift. Maybe you can try to reduce a lit test from it. https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

2025-06-08 Thread Chuanqi Xu via cfe-commits
@@ -176,14 +176,10 @@ class StoredDeclsList { DeclListNode::Decls *Tail = erase_if([Decls](NamedDecl *ND) { if (ND->isFromASTFile()) return true; - // FIXME: Can we get rid of this loop completely? - for (NamedDecl *D : Decls) -// Only replac

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

2025-06-08 Thread Chuanqi Xu via cfe-commits
@@ -176,14 +176,10 @@ class StoredDeclsList { DeclListNode::Decls *Tail = erase_if([Decls](NamedDecl *ND) { if (ND->isFromASTFile()) return true; - // FIXME: Can we get rid of this loop completely? - for (NamedDecl *D : Decls) -// Only replac

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

2025-06-08 Thread Chuanqi Xu via cfe-commits
@@ -177,13 +177,10 @@ class StoredDeclsList { if (ND->isFromASTFile()) return true; // FIXME: Can we get rid of this loop completely? - for (NamedDecl *D : Decls) -// Only replace the local declaration if the external declaration has -//

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,96 @@ +# A smoke test to check that a simple dependency chain for modules can work. +# +# FIXME: This fails on the Windows ARM64 build server. Not entirely sure why as it has been tested on +#an ARM64 Windows VM and appears to work there. +# UNSUPPORTED: host=a

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

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

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

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

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

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

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM then. Thanks. BTW, clangd prefer unittests than lit test. So you'd better to use unittests next time. https://github.com/llvm/llvm-project/pull/142828 ___ cfe-commits mailing list cfe-com

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @fleeting-xx BTW, I think this worth to be backported to 20.x. But we need to fix the above problem first. https://github.com/llvm/llvm-project/pull/142828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-10 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,96 @@ +# A smoke test to check that a simple dependency chain for modules can work. +# +# FIXME: This fails on the Windows ARM64 build server. Not entirely sure why as it has been tested on +#an ARM64 Windows VM and appears to work there. +# UNSUPPORTED: host=a

[clang] Reland "[Modules] Record whether VarDecl initializers contain side effects" (PR #145447)

2025-06-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: What is the difference between this one and the previous PR? https://github.com/llvm/llvm-project/pull/145447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

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

[clang] Reland "[Modules] Record whether VarDecl initializers contain side effects" (PR #145447)

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

[clang] a6e5242 - [Modules] Add merged Files to UsedModuleFiles

2025-06-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-26T13:39:45+08:00 New Revision: a6e524276e2c0596162a9635e0aa87a5ba145409 URL: https://github.com/llvm/llvm-project/commit/a6e524276e2c0596162a9635e0aa87a5ba145409 DIFF: https://github.com/llvm/llvm-project/commit/a6e524276e2c0596162a9635e0aa87a5ba145409.diff LO

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

2025-06-25 Thread Chuanqi Xu via cfe-commits
@@ -1469,6 +1470,12 @@ bool MatchASTVisitor::TraverseDecl(Decl *DeclNode) { return true; } + if (Options.SkipDeclsInModules && DeclNode->isFromASTFile()) { +auto *M = DeclNode->getOwningModule(); +if (M && (M->isInterfaceOrPartition() || M->isGlobalModule())) +

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

2025-06-25 Thread Chuanqi Xu via cfe-commits
@@ -139,6 +139,11 @@ class MatchFinder { /// /// It prints a report after match. std::optional CheckProfiling; + +bool SkipDeclsInModules = false; + +MatchFinderOptions() +: CheckProfiling(std::nullopt), SkipDeclsInModules(false) {}

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

2025-06-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/145630 >From 3e526e9a666dcc2ea0e6bdcb666dca43ab6ba740 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 17 Jan 2024 13:22:10 +0800 Subject: [PATCH 1/2] [clang-tidy] [Modules] Skip checking decls in clang-tidy --

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

2025-06-25 Thread Chuanqi Xu via cfe-commits
@@ -1469,6 +1470,12 @@ bool MatchASTVisitor::TraverseDecl(Decl *DeclNode) { return true; } + if (Options.SkipDeclsInModules && DeclNode->isFromASTFile()) { +auto *M = DeclNode->getOwningModule(); +if (M && (M->isInterfaceOrPartition() || M->isGlobalModule())) +

[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

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

[clang] [clang] NFC: Add alias for std::pair used in SourceLocation (PR #145711)

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

[clang] [llvm] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-06-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: I love this really. https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d829636 - [C++20] [Modules] Don't mark namespace decl as module local declaration

2025-06-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-27T13:35:09+08:00 New Revision: d829636f5d71d8a3771d9f96f22f1fe7507a32ec URL: https://github.com/llvm/llvm-project/commit/d829636f5d71d8a3771d9f96f22f1fe7507a32ec DIFF: https://github.com/llvm/llvm-project/commit/d829636f5d71d8a3771d9f96f22f1fe7507a32ec.diff LO

[clang] [llvm] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-06-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > @ChuanqiXu9 @dwblaikie please let me know if you feel comfortable reviewing > this change or if we also need input from others 🙂 I like the work but my knowledge to dwarf is limited. But I'd like to approve this if no one gives feedbacks. I do think it is better to move on.

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-06-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. I don't feel there are coroutine specific things, but if you want, I can accept this. https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang][modules] Remove the workaround for the lambda issue. (PR #142547)

2025-06-02 Thread Chuanqi Xu via cfe-commits
@@ -1702,36 +1702,7 @@ static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) { assert(allLookupResultsAreTheSame(Calls) && "More than one lambda call operator!"); - - // FIXME: If we have multiple call operators, we might be in a situation - // w

[clang-tools-extra] [clangd] [Modules] Fixes to correctly handle module dependencies (PR #142090)

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

[clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Thanks. I feel good with it. https://github.com/llvm/llvm-project/pull/141889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: FWIW, I sent https://github.com/llvm/llvm-project/pull/143647 https://github.com/llvm/llvm-project/pull/142828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    18   19   20   21   22   23   24   >