[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. https://github.com/llvm/llvm-p

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

[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 &TC) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. ChuanqiXu9 wrote: ```s

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

[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 &TC) 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
@@ -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
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { 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
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain &TC) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation

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

[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 cfe-commits@lists.llvm.o

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

[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 &TC) 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-28 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,15 @@ +// Test that -print-library-module-manifest-path finds the correct file. ChuanqiXu9 wrote: Let's change the suffix of this file to `.cpp` https://github.com/llvm/llvm-project/pull/76451 ___ cfe-commit

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

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,9 @@ +// Test that -print-library-module-manifest-path finds the correct file. ChuanqiXu9 wrote: Let's change the suffix. https://github.com/llvm/llvm-project/pull/76451 ___ cfe-commits mailing list cfe-comm

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

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" ChuanqiXu9 wrote: I don't get why we can't jus

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

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" ChuanqiXu9 wrote: But "module: =" doesn't look

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

2024-01-01 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping~ what's the fate of the patch? 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] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-01-02 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @dwblaikie @rjmccall ping~ https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-02 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @iains @dwblaikie ping~ https://github.com/llvm/llvm-project/pull/75894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/76774 The idea comes from @vgvassilev and @vgvassilev had patch for it on phab. Unfortunately phab is closed and I forgot the Dxxx number of that patch. But I remember the last comment from @vgvassilev is that we s

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

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

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/76774 >From af6f8ca9b739c532a489881245fac1413ec84a07 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 3 Jan 2024 11:33:17 +0800 Subject: [PATCH] Load Specializations Lazily --- clang/include/clang/AST/DeclTemp

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/76774 >From 79cefc9f0f006acd788b6ac4e240c17d9deadf13 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 3 Jan 2024 11:33:17 +0800 Subject: [PATCH] Load Specializations Lazily --- clang/include/clang/AST/DeclTemp

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

2024-01-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > @ChuanqiXu9 very sorry for the slow review. It would help me if the design > was described in the commit message instead of trying to deduce it from the > patch (maybe it's in a thread somewhere - so a cross-reference would help). hi @iains , sorry for the confusion. It may

[clang] [C++20] [Modules] Implementing Eliding Unreachable Decls of GMF in ASTWriter (PR #76930)

2024-01-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/76930 This was a patch to try to implement eliding unreachable decls in GMF in ASTWriter. It was developed a half year ago and I just rebased it but I did't fix the failing test. It ran well. The core idea of the

[clang] [C++20] [Modules] Implementing Eliding Unreachable Decls of GMF in ASTWriter (PR #76930)

2024-01-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/76930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-04 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Like I said in the commit message, this patch itself doesn't involve > > anything relevant to user interfaces. I left it to the latter patches. > > Are you in a position to post the next patch (at least as a draft)? That > would help me see the direction. I post it here

[clang] f5fd183 - [NFC] [C++20] [Modules] Remove pr60085.cppm with deprecated practice

2024-01-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-05T11:31:22+08:00 New Revision: f5fd1836836e0d37dea61cc842199713cc0e2fc4 URL: https://github.com/llvm/llvm-project/commit/f5fd1836836e0d37dea61cc842199713cc0e2fc4 DIFF: https://github.com/llvm/llvm-project/commit/f5fd1836836e0d37dea61cc842199713cc0e2fc4.diff LO

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-04 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > This is a great way to start a new year ;) > > The phab link is https://reviews.llvm.org/D41416. > > In general I was wondering could we simplify the implementation by loading > the specialization hash table upon module load. That should be relatively > cheap as we will re

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-04 Thread Chuanqi Xu via cfe-commits
@@ -150,6 +150,11 @@ class ExternalASTSource : public RefCountedBase { virtual bool FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name); + /// Load all the external specialzations for the Decl and the corresponding + /// template arguments. + vi

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-04 Thread Chuanqi Xu via cfe-commits
@@ -527,6 +527,10 @@ class ASTWriter : public ASTDeserializationListener, bool isLookupResultExternal(StoredDeclsList &Result, DeclContext *DC); bool isLookupResultEntirelyExternal(StoredDeclsList &Result, DeclContext *DC); + uint64_t + WriteSpecsLookupTable(NamedDecl *

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-04 Thread Chuanqi Xu via cfe-commits
@@ -2431,10 +2434,14 @@ void ASTDeclReader::VisitClassTemplateDecl(ClassTemplateDecl *D) { mergeRedeclarableTemplate(D, Redecl); if (ThisDeclID == Redecl.getFirstID()) { -// This ClassTemplateDecl owns a CommonPtr; read it to keep track of all of -// the specializ

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-04 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: Interesting. I didn't recognize this. If th

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

2024-01-04 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I'm Sam's colleague and wanted to mention that Sam won't be available until > January 15. It probably does not make much sense for someone else to take > over at this point as the change is large and waiting for Sam is more > efficient than ramping up someone else at this p

[clang] [coroutines] Introduce [[clang::coro_disable_lifetimebound]] (PR #76818)

2024-01-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. I feel good with this. We can do other improvements in other patches. https://github.com/llvm/llvm-project/pull/76818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-05 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: Great analysis. Fair enough, let's find a m

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Maybe it'll be better to say this is related to `[[coro_lifetimebound]]`. My instinct reaction to this is that "no, this is not strictly correct". But I feel good after I know it is an extension of `[[coro_lifetimebound]]` only. https://github.com/llvm/

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

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

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

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

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

2024-01-07 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 %t/l

[clang] 9b808a4 - [NFC] [Modules] Add a test case for selecting specializations with aliased template args

2024-01-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-08T14:46:11+08:00 New Revision: 9b808a4beb8e6c8255b412fdd6f5a3e20cbcf270 URL: https://github.com/llvm/llvm-project/commit/9b808a4beb8e6c8255b412fdd6f5a3e20cbcf270 DIFF: https://github.com/llvm/llvm-project/commit/9b808a4beb8e6c8255b412fdd6f5a3e20cbcf270.diff LO

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: I tried to add a test case to show the prob

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: The secret why ODRHash can handle this may

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

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -15754,10 +15754,18 @@ bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, LValue LVal; LVal.set(VD); -if (!EvaluateInPlace(Value, Info, LVal, this, - /*AllowNonLiteralTypes=*/true) || -EStatus.HasSideEffects)

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

2024-01-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Ping, is this ok to be accepted and landed? If it is not hurry, I prefer to wait @cor3ntin to have a look. But given the scale of the patch, it should be good too to land it in 2 weeks if there is no other comments. https://github.com/llvm/llvm-project/pull/69076 _

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

2024-01-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Well, this patch is up since almost three months now (!). Sure, we can keep > carrying a similar fix downstream, but ideally I would really like to get rid > of as many local changes as possible. That's not possible without proper > review, but the current situation is quit

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: I had this https://github.com/llvm/llvm-pr

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: It looks like the qualified related problem

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > This is a great way to start a new year ;) > > > The phab link is https://reviews.llvm.org/D41416. > > > In general I was wondering could we simplify the implementation by > > > loading the specialization hash table upon module load. That should be > > > relatively cheap

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: Yeah, I just saw it. My concern for reinven

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

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

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/76774 >From 50fd47f2bfda527807f8cc5e46425050246868aa Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 3 Jan 2024 11:33:17 +0800 Subject: [PATCH] Load Specializations Lazily --- clang/include/clang/AST/DeclTemp

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I failed to use spr to create stacked review... So I just create the stacked PR manually: https://github.com/llvm/llvm-project/pull/77417 https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -527,6 +527,10 @@ class ASTWriter : public ASTDeserializationListener, bool isLookupResultExternal(StoredDeclsList &Result, DeclContext *DC); bool isLookupResultEntirelyExternal(StoredDeclsList &Result, DeclContext *DC); + uint64_t + WriteSpecsLookupTable(NamedDecl *

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I failed to use spr to create stacked review... So I just create the stacked > PR manually: #77417. Luckily the context are remained. I heard the current > context may be lost if we change to use spr now. https://github.com/llvm/llvm-project/pull/76774 ___

[clang] [Serialization] Load Specializations Lazily (PR #76774)

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

[clang] [Serialization] Load Specializations Lazily (PR #76774)

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

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-09 Thread Chuanqi Xu via cfe-commits
@@ -100,6 +100,11 @@ ExternalASTSource::FindExternalVisibleDeclsByName(const DeclContext *DC, return false; } +void ExternalASTSource::LoadExternalSpecializations( +const Decl *D, ArrayRef TemplateArgs) { + return; ChuanqiXu9 wrote: Will do in the nex

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Have you run that patch on bigger workflows? Do we have some performance > numbers to compare? I've tested it functionality in our largest workload about modules. It runs well. But our uses of modules don't have a lot of complexities while it has a large scale. For perform

[clang] [AST] Mark the fallthrough coreturn statement implicit. (PR #77465)

2024-01-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Can you provide more context for this? https://github.com/llvm/llvm-project/pull/77465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/76774 >From 50fd47f2bfda527807f8cc5e46425050246868aa Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 3 Jan 2024 11:33:17 +0800 Subject: [PATCH 1/2] Load Specializations Lazily --- clang/include/clang/AST/Decl

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > @ChuanqiXu9, this PR does not seem to compile. Can you make the second commit > work before I start testing? Oh, sorry. It should work now! https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@l

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-10 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/76774 >From 50fd47f2bfda527807f8cc5e46425050246868aa Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 3 Jan 2024 11:33:17 +0800 Subject: [PATCH 1/3] Load Specializations Lazily --- clang/include/clang/AST/Decl

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-11 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Update: Previously we will always try to load the specializations with the corresponding arguments before finding the specializations. This requires to hash the template arguments. This patch tries to improve this by trying to load the specializations only if

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/76774 >From 50fd47f2bfda527807f8cc5e46425050246868aa Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 3 Jan 2024 11:33:17 +0800 Subject: [PATCH 1/3] Load Specializations Lazily --- clang/include/clang/AST/Decl

[clang] fd47894 - [NFC] Add parentheses around && within || to avoid warning

2022-06-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-06-27T14:44:10+08:00 New Revision: fd47894d88faf9147bcdb99cb5cae33519e418dd URL: https://github.com/llvm/llvm-project/commit/fd47894d88faf9147bcdb99cb5cae33519e418dd DIFF: https://github.com/llvm/llvm-project/commit/fd47894d88faf9147bcdb99cb5cae33519e418dd.diff LO

[clang] a223ba0 - [C++20] [Modules] Implement Reachable initiallly

2022-06-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-06-29T12:32:31+08:00 New Revision: a223ba0a697c1598b434cf2495c9cd9ec5640fc7 URL: https://github.com/llvm/llvm-project/commit/a223ba0a697c1598b434cf2495c9cd9ec5640fc7 DIFF: https://github.com/llvm/llvm-project/commit/a223ba0a697c1598b434cf2495c9cd9ec5640fc7.diff LO

[clang] 7a54140 - Revert "[C++20] [Modules] Implement Reachable initiallly"

2022-06-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-06-29T12:43:26+08:00 New Revision: 7a541406b5a23a811a4f37432292a6de3307b0f1 URL: https://github.com/llvm/llvm-project/commit/7a541406b5a23a811a4f37432292a6de3307b0f1 DIFF: https://github.com/llvm/llvm-project/commit/7a541406b5a23a811a4f37432292a6de3307b0f1.diff LO

[clang] 9c04851 - [C++20] [Module] Support reachable definition initially/partially

2022-06-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-06-29T12:48:48+08:00 New Revision: 9c04851cf5809c80862183481f8ced0b3e9ee301 URL: https://github.com/llvm/llvm-project/commit/9c04851cf5809c80862183481f8ced0b3e9ee301 DIFF: https://github.com/llvm/llvm-project/commit/9c04851cf5809c80862183481f8ced0b3e9ee301.diff LO

[clang] f595003 - [NFC] [Modules] Add test for inherit default arguments

2022-06-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-06-30T15:48:22+08:00 New Revision: f595003e8e86bcb9531c2439f6a3771e669a3f3e URL: https://github.com/llvm/llvm-project/commit/f595003e8e86bcb9531c2439f6a3771e669a3f3e DIFF: https://github.com/llvm/llvm-project/commit/f595003e8e86bcb9531c2439f6a3771e669a3f3e.diff LO

[clang] f4dd977 - [AST] Use canonical constraint declaration for ASTContext::getAutoType

2022-07-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-04T17:38:05+08:00 New Revision: f4dd977537dc0fcd8605a1ce066a4c7fd271a5d7 URL: https://github.com/llvm/llvm-project/commit/f4dd977537dc0fcd8605a1ce066a4c7fd271a5d7 DIFF: https://github.com/llvm/llvm-project/commit/f4dd977537dc0fcd8605a1ce066a4c7fd271a5d7.diff LO

[clang] 85318d3 - [NFC] Remove unused test inputs

2022-07-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-05T10:55:24+08:00 New Revision: 85318d3281021f3900ee49338f6a9e2330b4a652 URL: https://github.com/llvm/llvm-project/commit/85318d3281021f3900ee49338f6a9e2330b4a652 DIFF: https://github.com/llvm/llvm-project/commit/85318d3281021f3900ee49338f6a9e2330b4a652.diff LO

[clang] 0826a56 - [NFC] make ASTContext:isSame* methods const

2022-07-06 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-07T13:34:15+08:00 New Revision: 0826a5617885bef2559c8213ec52685786ff0506 URL: https://github.com/llvm/llvm-project/commit/0826a5617885bef2559c8213ec52685786ff0506 DIFF: https://github.com/llvm/llvm-project/commit/0826a5617885bef2559c8213ec52685786ff0506.diff LO

[clang] 354a597 - [C++20] [Modules] Don't complain about duplicated default template argument across modules

2022-07-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-08T11:10:51+08:00 New Revision: 354a597b9f3aad2a6a37518d47351adb99688cd2 URL: https://github.com/llvm/llvm-project/commit/354a597b9f3aad2a6a37518d47351adb99688cd2 DIFF: https://github.com/llvm/llvm-project/commit/354a597b9f3aad2a6a37518d47351adb99688cd2.diff LO

[clang] 1934b3a - [docs] Add document "Debugging C++ Coroutines"

2022-07-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-08T11:29:00+08:00 New Revision: 1934b3ae59a7869d324bb34218310cae55acb140 URL: https://github.com/llvm/llvm-project/commit/1934b3ae59a7869d324bb34218310cae55acb140 DIFF: https://github.com/llvm/llvm-project/commit/1934b3ae59a7869d324bb34218310cae55acb140.diff LO

[clang] 8db8754 - [NFC] Move isSameDefaultTemplateArgument into ASTContext

2022-07-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-08T14:35:01+08:00 New Revision: 8db87547beb337bee12941f379473f065adeba88 URL: https://github.com/llvm/llvm-project/commit/8db87547beb337bee12941f379473f065adeba88 DIFF: https://github.com/llvm/llvm-project/commit/8db87547beb337bee12941f379473f065adeba88.diff LO

[clang] 8474668 - [C++20] [Modules] Make the linkage consistent for template and its

2022-03-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-03-24T10:24:14+08:00 New Revision: 84746686088799ec9e3cc5ea0a64df81423da290 URL: https://github.com/llvm/llvm-project/commit/84746686088799ec9e3cc5ea0a64df81423da290 DIFF: https://github.com/llvm/llvm-project/commit/84746686088799ec9e3cc5ea0a64df81423da290.diff LO

[clang] ee57212 - [C++20] [Modules] Use '-' as the separator of partitions when searching

2022-03-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-03-31T11:21:58+08:00 New Revision: ee572129ae15bc15e34fcae63643d6998352dab3 URL: https://github.com/llvm/llvm-project/commit/ee572129ae15bc15e34fcae63643d6998352dab3 DIFF: https://github.com/llvm/llvm-project/commit/ee572129ae15bc15e34fcae63643d6998352dab3.diff LO

[clang] 3cec39b - [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-31 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-04-01T14:36:04+08:00 New Revision: 3cec39b91c50944095affc52eee286e3161772b4 URL: https://github.com/llvm/llvm-project/commit/3cec39b91c50944095affc52eee286e3161772b4 DIFF: https://github.com/llvm/llvm-project/commit/3cec39b91c50944095affc52eee286e3161772b4.diff LO

[clang] 15ddc09 - [C++20] [Modules] Handle linkage properly for specializations when overloading

2022-07-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-26T18:30:48+08:00 New Revision: 15ddc09ef9b05ffd5398165049b5202264fa203a URL: https://github.com/llvm/llvm-project/commit/15ddc09ef9b05ffd5398165049b5202264fa203a DIFF: https://github.com/llvm/llvm-project/commit/15ddc09ef9b05ffd5398165049b5202264fa203a.diff LO

[clang] c73adba - [clang] [docs] Update the changes of C++20 Modules in clang15

2022-07-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-26T18:47:53+08:00 New Revision: c73adbad6a9964e0700865b7c786cc6885898c68 URL: https://github.com/llvm/llvm-project/commit/c73adbad6a9964e0700865b7c786cc6885898c68 DIFF: https://github.com/llvm/llvm-project/commit/c73adbad6a9964e0700865b7c786cc6885898c68.diff LO

[clang] 99daf6b - [C++20] [Modules] Don't handle no linkage entities when overloading

2022-07-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-26T21:07:41+08:00 New Revision: 99daf6b2636245446cab0a7800e36fd34777e599 URL: https://github.com/llvm/llvm-project/commit/99daf6b2636245446cab0a7800e36fd34777e599 DIFF: https://github.com/llvm/llvm-project/commit/99daf6b2636245446cab0a7800e36fd34777e599.diff LO

[clang] a2772fc - [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

2022-07-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-26T23:58:07+08:00 New Revision: a2772fc806af7db5d58c7e3d604270a92fff79de URL: https://github.com/llvm/llvm-project/commit/a2772fc806af7db5d58c7e3d604270a92fff79de DIFF: https://github.com/llvm/llvm-project/commit/a2772fc806af7db5d58c7e3d604270a92fff79de.diff LO

[clang] 5588985 - [NFC] Convert a dyn_cast<> to an isa<>

2022-07-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-27T13:56:38+08:00 New Revision: 55889852127245b830bc3231f172eed53dcb355e URL: https://github.com/llvm/llvm-project/commit/55889852127245b830bc3231f172eed53dcb355e DIFF: https://github.com/llvm/llvm-project/commit/55889852127245b830bc3231f172eed53dcb355e.diff LO

[clang] e8e46cd - [NFC] [C++20] [Modules] Use Sema::isCurrentModulePurview() to simplify the codes

2022-07-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-27T14:15:32+08:00 New Revision: e8e46cdce3ed3fbd1a0a632a7f69abb97be33cf4 URL: https://github.com/llvm/llvm-project/commit/e8e46cdce3ed3fbd1a0a632a7f69abb97be33cf4 DIFF: https://github.com/llvm/llvm-project/commit/e8e46cdce3ed3fbd1a0a632a7f69abb97be33cf4.diff LO

[clang] 8d91b1d - [NFC] [C++20] [Modules] Use Sema::isModuleUnitOfCurrentTU to simplify the code

2022-07-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-27T14:33:28+08:00 New Revision: 8d91b1da576b1643175fbac0fb4b3a95bed07bf0 URL: https://github.com/llvm/llvm-project/commit/8d91b1da576b1643175fbac0fb4b3a95bed07bf0 DIFF: https://github.com/llvm/llvm-project/commit/8d91b1da576b1643175fbac0fb4b3a95bed07bf0.diff LO

[clang] fe1887d - [NFC] [C++20] [Modules] Add tests for merging redefinitions in modules

2022-07-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-28T11:32:47+08:00 New Revision: fe1887da36c63f64903de112f2a8e88f973318fa URL: https://github.com/llvm/llvm-project/commit/fe1887da36c63f64903de112f2a8e88f973318fa DIFF: https://github.com/llvm/llvm-project/commit/fe1887da36c63f64903de112f2a8e88f973318fa.diff LO

[clang] 4d9251b - [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-29T10:50:27+08:00 New Revision: 4d9251bd780d20eebbcb124608b36a69787d5575 URL: https://github.com/llvm/llvm-project/commit/4d9251bd780d20eebbcb124608b36a69787d5575 DIFF: https://github.com/llvm/llvm-project/commit/4d9251bd780d20eebbcb124608b36a69787d5575.diff LO

[clang] 39dd8dc - [NFC] Fix test failure in windows

2022-07-31 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-01T14:14:02+08:00 New Revision: 39dd8dcf208d24a8004f46ec0f3e912514a346b6 URL: https://github.com/llvm/llvm-project/commit/39dd8dcf208d24a8004f46ec0f3e912514a346b6 DIFF: https://github.com/llvm/llvm-project/commit/39dd8dcf208d24a8004f46ec0f3e912514a346b6.diff LO

[clang] 834a878 - [C++2b] [Modules] Handle HaveModules with C++2b

2022-08-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-01T16:06:34+08:00 New Revision: 834a878367f549c58313200ce2c3a0da1a29d842 URL: https://github.com/llvm/llvm-project/commit/834a878367f549c58313200ce2c3a0da1a29d842 DIFF: https://github.com/llvm/llvm-project/commit/834a878367f549c58313200ce2c3a0da1a29d842.diff LO

[clang] db6152a - [C++20] [Modules] Handle initializer for Header Units

2022-08-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-02T10:27:02+08:00 New Revision: db6152ad66d7cf48f9f5c3eb28bf54c092978773 URL: https://github.com/llvm/llvm-project/commit/db6152ad66d7cf48f9f5c3eb28bf54c092978773 DIFF: https://github.com/llvm/llvm-project/commit/db6152ad66d7cf48f9f5c3eb28bf54c092978773.diff LO

[clang] 39cfde2 - Revert "[C++20] [Modules] Handle initializer for Header Units"

2022-08-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-02T11:09:38+08:00 New Revision: 39cfde236693a928ff6594ddc321c4550237cfaa URL: https://github.com/llvm/llvm-project/commit/39cfde236693a928ff6594ddc321c4550237cfaa DIFF: https://github.com/llvm/llvm-project/commit/39cfde236693a928ff6594ddc321c4550237cfaa.diff LO

[clang] 6d10733 - [C++20] [Modules] Handle initializer for Header Units

2022-08-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-02T11:24:46+08:00 New Revision: 6d10733d445506c02ebec9faa54658431857bb49 URL: https://github.com/llvm/llvm-project/commit/6d10733d445506c02ebec9faa54658431857bb49 DIFF: https://github.com/llvm/llvm-project/commit/6d10733d445506c02ebec9faa54658431857bb49.diff LO

<    1   2   3   4   5   6   7   8   9   10   >