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

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

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

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

[clang] 7bc170a - [C++20] [Modules] [Serialization] Don't record '#pragma once' information in named modules

2024-01-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-15T17:00:49+08:00 New Revision: 7bc170a261ae0daaddcc1abeacf7e9e0f1f66d02 URL: https://github.com/llvm/llvm-project/commit/7bc170a261ae0daaddcc1abeacf7e9e0f1f66d02 DIFF: https://github.com/llvm/llvm-project/commit/7bc170a261ae0daaddcc1abeacf7e9e0f1f66d02.diff LO

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

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

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

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { RecordDecl *RD = FD->getReturnType()->getAsRecordDecl(); if (!RD || !RD->getUnderlyingDecl()->hasAttr()) return; - // Allow `get_return_object()`. - if (FD->getDeclName().isIdentifier() && +

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

2024-01-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM then. 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] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-15 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][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { RecordDecl *RD = FD->getReturnType()->getAsRecordDecl(); if (!RD || !RD->getUnderlyingDecl()->hasAttr()) return; - // Allow `get_return_object()`. - if (FD->getDeclName().isIdentifier() && +

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +el

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_pure_attr_on_cxx_constructor : Warning< + "constructor cannot be 'pure' (undefined behavior

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +el

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

2024-01-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > @ilya-biryukov any chance you/your folks could test this change for > > performance implications in google? It's especially helpful to CERN, but > > the last iteration of this direction had some regressions that stalled out > > progress on that version a few years ago, so

[clang] [Clang] Only compare template params of potential overload after checking their decl context (PR #78139)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,28 @@ +// From https://github.com/llvm/llvm-project/issues/77953 +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm +// RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm %t/b.

[clang] 1b6c1a3 - [NFC] Improve test for clang/test/Modules/GH77953.cpp

2024-01-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-16T11:32:10+08:00 New Revision: 1b6c1a3bd73be4dd904230c637d65810cf3334cd URL: https://github.com/llvm/llvm-project/commit/1b6c1a3bd73be4dd904230c637d65810cf3334cd DIFF: https://github.com/llvm/llvm-project/commit/1b6c1a3bd73be4dd904230c637d65810cf3334cd.diff LO

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

2024-01-16 Thread Chuanqi Xu via cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { RecordDecl *RD = FD->getReturnType()->getAsRecordDecl(); if (!RD || !RD->getUnderlyingDecl()->hasAttr()) return; - // Allow `get_return_object()`. - if (FD->getDeclName().isIdentifier() && +

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

2024-01-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM then 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] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > LGTM. > > We need to delete > > `clang/test/Driver/Inputs/cxx23_modules/usr/lib/x86_64-linux-gnu/libc++.so` > > and > > `clang/test/Driver/Inputs/cxx23_modules/usr/lib/x86_64-linux-gnu/modules.json`, > > we should generate them with `split-file` > > Are you sure that is

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Chuanqi Xu via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Chuanqi Xu via cfe-commits
@@ -11802,6 +11802,27 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread Chuanqi Xu via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread Chuanqi Xu via cfe-commits
@@ -11802,6 +11802,27 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] 085eae6 - [C++20] [Modules] Allow to merge enums with the same underlying interger types

2024-01-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-18T17:09:35+08:00 New Revision: 085eae6b863881fb9fda323e5b672b04a00ed19e URL: https://github.com/llvm/llvm-project/commit/085eae6b863881fb9fda323e5b672b04a00ed19e DIFF: https://github.com/llvm/llvm-project/commit/085eae6b863881fb9fda323e5b672b04a00ed19e.diff LO

[clang] [coroutine] Create coroutine body in the correct eval context (PR #78589)

2024-01-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/78589 ___ 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-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > We saw some failures internally with this patch: > > * `"'absl::AnyInvocable' has different definitions in different > modules;".` > Probably related to the template arguments stability you mention. > * `"No type named 'MemberType' in 'some_object::Traits'"`. > I suspect

[clang] 407db48 - [Release Notes] [C++20] [Modules] Summarize modules related change to the release note for clang 18

2024-01-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-19T15:26:22+08:00 New Revision: 407db48eb4d387ae272bfbef9b12868806f1e830 URL: https://github.com/llvm/llvm-project/commit/407db48eb4d387ae272bfbef9b12868806f1e830 DIFF: https://github.com/llvm/llvm-project/commit/407db48eb4d387ae272bfbef9b12868806f1e830.diff LO

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

2024-01-21 Thread Chuanqi Xu via cfe-commits
@@ -3924,6 +3925,154 @@ class ASTDeclContextNameLookupTrait { } // namespace +namespace { +class SpecializationsLookupTrait { + ASTWriter &Writer; + llvm::SmallVector DeclIDs; + +public: + using key_type = unsigned; + using key_type_ref = key_type; + + /// A start and en

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

2024-01-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I tried applying this patch to ROOT/Cling and it fails to build because > > something is of the opinion that `std::is_integral::value` is not > > true. I don't have time right now to investigate further, but since this is > > the only change I did it is highly likely that

[clang] a31a600 - [docs] Update StandardCPlusPlusModules.rst with clang18

2024-01-21 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-22T14:24:33+08:00 New Revision: a31a60074717fc40887cfe132b77eec93bedd307 URL: https://github.com/llvm/llvm-project/commit/a31a60074717fc40887cfe132b77eec93bedd307 DIFF: https://github.com/llvm/llvm-project/commit/a31a60074717fc40887cfe132b77eec93bedd307.diff LO

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

2024-01-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > I tried applying this patch to ROOT/Cling and it fails to build because > > > > something is of the opinion that `std::is_integral::value` is not > > > > true. I don't have time right now to investigate further, but since > > > > this is the only change I did it is hi

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

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

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

2024-01-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: In the newest push, I changed 2 things: - In `ASTReader::LoadExternalSpecializations`, I am moving `Deserializing LookupResults(this);` before calculating the ODR hash for template arguments. Since I didn't realize that the ODRHash may trigger deserializing before. - I introdu

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

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

[clang] ba1e84f - [C++20] [Modules] Handle inconsistent deduced function return type from importing modules

2024-01-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-23T16:19:51+08:00 New Revision: ba1e84fb8f45e102f40f409fcfe9b420fbf9fb70 URL: https://github.com/llvm/llvm-project/commit/ba1e84fb8f45e102f40f409fcfe9b420fbf9fb70 DIFF: https://github.com/llvm/llvm-project/commit/ba1e84fb8f45e102f40f409fcfe9b420fbf9fb70.diff LO

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Does MSVC have the delayed template parsing effects when using modules? If > not, perhaps we should just disable the flag/not allow it to be composed > together? As far as I can reach, (from the issue reports in MSVC community), MSVC don't have problems with the delayed te

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/69551 Close https://github.com/llvm/llvm-project/issues/69439. This patch tries to reuse the codes to generate make style dependencies information with P1689 format directly. >From 17b84659fa91d8a92a3d41aad8fbc3fa

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/69555 Close https://github.com/llvm/llvm-project/issues/68615. It is generally wrong to include in the module purview. Although there are cases to include files in the module purview, generally these use cases sh

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69555 >From 86663a35a7af039f9440af2cc1896e8b4cf33310 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 19 Oct 2023 11:28:01 +0800 Subject: [PATCH] [C++20] [Modules] Warn if we found #include in module purview

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-19 Thread Chuanqi Xu via cfe-commits
@@ -922,6 +922,10 @@ def err_header_import_semi_in_macro : Error< def err_header_import_not_header_unit : Error< "header file %0 (aka '%1') cannot be imported because " "it is not known to be a header unit">; +def warn_pp_include_angled_in_module_purview : Warning< + "'#in

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > When I suggested this, it was an intention to limit it to C++ std library > headers. Do we not have some existing mechanism that knows which headers are > in this category (for typo correction etc?) As far as I can reach, we don't have such a mechanism. I was wondering if w

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Is delayed template parsing an optimisation or a correctness measure? If it's > an optimisation, then it seems that we should disable it for modules (because > that then makes the modules cases correct). If it's needed for correctness, > then we have more of a problem - do

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69555 >From 86663a35a7af039f9440af2cc1896e8b4cf33310 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 19 Oct 2023 11:28:01 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Warn if we found #include in module purvi

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-19 Thread Chuanqi Xu via cfe-commits
@@ -922,6 +922,10 @@ def err_header_import_semi_in_macro : Error< def err_header_import_not_header_unit : Error< "header file %0 (aka '%1') cannot be imported because " "it is not known to be a header unit">; +def warn_pp_include_angled_in_module_purview : Warning< + "'#in

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > (in this context) Framework headers are like system (or user headers) but > searched by a different mechanism (so they are #include-ed). In principle, > the same constraints should apply - indicates a "system" > header and probably should not be included in the module purv

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > According to the docs [0], MSVC actually defaults to > `-fno-delayed-template-parsing` (`/Zc:twoPhase-` with MSVC CLI) if using > C++20. This is due to `-std:c++20` implying `/permissive-` which implies > `/Zc:twoPhase-`. We could therefore just disable it based on language

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-10-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69555 >From 86663a35a7af039f9440af2cc1896e8b4cf33310 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 19 Oct 2023 11:28:01 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Warn if we found #include in module purvi

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Is the issue with MDC's FileDeps that we are calling > `makeAbsoluteAndPreferred` on the paths? Maybe we could instead move that > call into `FullDependencyConsumer`. Or are there other issues? > > The fact we need to add additional `MDC.IsStdModuleP1689Format` checks in >

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69431 >From 076f2ea9de7d0f979431363b5426931239c7c494 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 18 Oct 2023 15:58:03 +0800 Subject: [PATCH] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsi

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > I still support disabling delayed template parsing by default in all > > > configurations. Ultimately, this feature is a source of bugs, and we > > > should start the clock on its deprecation and removal. This, of course, > > > involves real work, and I haven't allocate

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69431 >From 9c0d81ef5fdae40d378170eebd848f099902dc98 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 18 Oct 2023 15:58:03 +0800 Subject: [PATCH] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsi

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Comments addressed. https://github.com/llvm/llvm-project/pull/69431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

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

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

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

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Yeah, this is the reason why I put the change in `C++ Specific Potentially Breaking Changes` section. I think specify `-fdelayed-template-parsing` explicitly may be a good solution/workaroud. https://github.com/llvm/llvm-project/pull/69431

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Besides deps scanning, have you tried to enable these option to compile with clang modules? I mean, if it is safe to enable such options at compilation times, it looks a valid optimization for C++20 modules too. If it is not safe to do so, I think we ne

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

2023-10-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @zygoloid @vgvassilev ping~ Personally I feel like the change itself should be safe. (The test for modules is really sensitive about the changes in Serializer) https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing

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

2023-10-24 Thread Chuanqi Xu via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

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

2023-10-25 Thread Chuanqi Xu via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

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

2023-10-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: While the change itself looks neat, I am curious about the reason how this interact with modules. https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [RFC] Perform lifetime bound checks for arguments to coroutine (PR #69360)

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

[clang] [RFC] Perform lifetime bound checks for arguments to coroutine (PR #69360)

2023-10-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Thanks for bringing this! I didn't notice the post in discourse and I'll put higher level comments there. https://github.com/llvm/llvm-project/pull/69360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [RFC] Perform lifetime bound checks for arguments to coroutine (PR #69360)

2023-10-25 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,184 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only -verify -Wall -Wextra -Wno-error=unreachable-code -Wno-unused + +#include "Inputs/std-coroutine.h" + +using std::suspend_always; +using std::suspend_never; + + +#define CORO_TYPE [[clan

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-25 Thread Chuanqi Xu via cfe-commits
@@ -219,6 +219,12 @@ class HeaderSearchOptions { unsigned ModulesValidateDiagnosticOptions : 1; + /// Whether to entirely skip writing diagnostic options. + unsigned ModulesSkipDiagnosticOptions : 1; + + /// Whether to entirely skip writing header search paths. -

[clang] [clang][NFC] Refactor enums that hold size of `Type` and `DeclContext` bit-fields (PR #70296)

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Consistency is good. https://github.com/llvm/llvm-project/pull/70296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From 5a1f32f156801da271486dbb0fd37007adb4901c Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH 1/4] [NFC] [Serializer] Pack information in serializer Previously

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

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From e99fc1ab1e609d8e69c5d60b4c5df3f5563273e3 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH] [Serializer] Pack bits into integers Previously, the boolean val

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

2023-10-26 Thread Chuanqi Xu via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

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

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From ae4ee482f5b6b5d2487ed642b92e513ffd269781 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH] [Serializer] Pack bits into integers Previously, the boolean val

[clang] Diagnose use of VLAs in a coroutine (PR #70341)

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Thanks! LGTM with a nit. https://github.com/llvm/llvm-project/pull/70341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose use of VLAs in a coroutine (PR #70341)

2023-10-26 Thread Chuanqi Xu via cfe-commits
@@ -1198,6 +1198,11 @@ void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) { if (FD->hasAttr()) Diag(FD->getLocation(), diag::warn_always_inline_coroutine); + // We don't allow use of VLAs within a coroutine, so diagnose if we've seen

[clang] Diagnose use of VLAs in a coroutine (PR #70341)

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

[clang] Diagnose use of VLAs in a coroutine (PR #70341)

2023-10-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > LGTM but it is missing a release note :) it may be fine to not mention it clearly since VLAs in coroutines never got compiled.. user might meet backend crashes.. https://github.com/llvm/llvm-project/pull/70341 ___ cfe-commits mail

[clang] Diagnose use of VLAs in a coroutine (PR #70341)

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

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @benlangmuir ping~ https://github.com/llvm/llvm-project/pull/69551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e9a7876 - [C++20] [Modules] Chose BMI from for module m with the last

2023-10-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-10-27T16:52:21+08:00 New Revision: e9a7876c2c81423f2289aa85eeac32d7a55cd3c8 URL: https://github.com/llvm/llvm-project/commit/e9a7876c2c81423f2289aa85eeac32d7a55cd3c8 DIFF: https://github.com/llvm/llvm-project/commit/e9a7876c2c81423f2289aa85eeac32d7a55cd3c8.diff LO

[clang] 8b48d24 - [clang-format] Recognize c++ coroutine keywords as unary operator to avoid misleading pointer alignment

2020-12-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2020-12-15T20:50:46+08:00 New Revision: 8b48d24373204fc2fe6aac1f1f850fa3b6c18445 URL: https://github.com/llvm/llvm-project/commit/8b48d24373204fc2fe6aac1f1f850fa3b6c18445 DIFF: https://github.com/llvm/llvm-project/commit/8b48d24373204fc2fe6aac1f1f850fa3b6c18445.diff LO

[clang] cd89c4d - [NFC][coroutines] remove unused argument in SemaCoroutine

2020-11-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2020-11-12T13:22:20+08:00 New Revision: cd89c4dbdd3a32749f85cb3ac666b1e9e43e9c0e URL: https://github.com/llvm/llvm-project/commit/cd89c4dbdd3a32749f85cb3ac666b1e9e43e9c0e DIFF: https://github.com/llvm/llvm-project/commit/cd89c4dbdd3a32749f85cb3ac666b1e9e43e9c0e.diff LO

[clang] af9f3c6 - [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-17 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2021-11-18T09:41:01+08:00 New Revision: af9f3c6d86b4afc93fb0a29ee430fc42f593800f URL: https://github.com/llvm/llvm-project/commit/af9f3c6d86b4afc93fb0a29ee430fc42f593800f DIFF: https://github.com/llvm/llvm-project/commit/af9f3c6d86b4afc93fb0a29ee430fc42f593800f.diff LO

[clang] 2ac339e - [C++20] [Coroutines] Warn for deprecated form 'for co_await'

2021-11-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2021-11-22T15:57:57+08:00 New Revision: 2ac339ef5f0feca2abe2b8a1720839c58184166c URL: https://github.com/llvm/llvm-project/commit/2ac339ef5f0feca2abe2b8a1720839c58184166c DIFF: https://github.com/llvm/llvm-project/commit/2ac339ef5f0feca2abe2b8a1720839c58184166c.diff LO

[clang] 3666cd0 - [Coroutines] Make suspend_always in test noexcept (NFC)

2021-12-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2021-12-01T16:16:36+08:00 New Revision: 3666cd0216b85ef962e92a5e19dea2215559b48a URL: https://github.com/llvm/llvm-project/commit/3666cd0216b85ef962e92a5e19dea2215559b48a DIFF: https://github.com/llvm/llvm-project/commit/3666cd0216b85ef962e92a5e19dea2215559b48a.diff LO

[clang] e8541e4 - [NFC] [Modules] Rename modules related things in Preprocessor and AffectingModules

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

[clang] e12b627 - [docs] Add the description about mixing use of clang modules and c++

2022-10-31 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-10-31T16:02:43+08:00 New Revision: e12b627a35ee41e2bee069bf871c8b779f4d4e35 URL: https://github.com/llvm/llvm-project/commit/e12b627a35ee41e2bee069bf871c8b779f4d4e35 DIFF: https://github.com/llvm/llvm-project/commit/e12b627a35ee41e2bee069bf871c8b779f4d4e35.diff LO

[clang] 22914a8 - [NFC] Use isa<...> to replace isa<>||isa<> in clang/Serialization

2022-10-31 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-10-31T21:17:03+08:00 New Revision: 22914a82299dc45d4e5a3ec6c50808c97e6e6a10 URL: https://github.com/llvm/llvm-project/commit/22914a82299dc45d4e5a3ec6c50808c97e6e6a10 DIFF: https://github.com/llvm/llvm-project/commit/22914a82299dc45d4e5a3ec6c50808c97e6e6a10.diff LO

[clang] 0bc993e - [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

2022-08-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-12T11:50:35+08:00 New Revision: 0bc993edf4ec57993c8fc11ea511b3d62ffd3c93 URL: https://github.com/llvm/llvm-project/commit/0bc993edf4ec57993c8fc11ea511b3d62ffd3c93 DIFF: https://github.com/llvm/llvm-project/commit/0bc993edf4ec57993c8fc11ea511b3d62ffd3c93.diff LO

[clang] e190b7c - [Coroutines] Maintain the position of final suspend

2022-08-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-12T13:05:08+08:00 New Revision: e190b7cc90ca5ee712ca3982bf476afa9e8acb3b URL: https://github.com/llvm/llvm-project/commit/e190b7cc90ca5ee712ca3982bf476afa9e8acb3b DIFF: https://github.com/llvm/llvm-project/commit/e190b7cc90ca5ee712ca3982bf476afa9e8acb3b.diff LO

[clang] efa8783 - [NFC] Add unittest for inline functions in modules

2022-08-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-16T13:35:38+08:00 New Revision: efa8783290d81689054d47bf71de452134bf4910 URL: https://github.com/llvm/llvm-project/commit/efa8783290d81689054d47bf71de452134bf4910 DIFF: https://github.com/llvm/llvm-project/commit/efa8783290d81689054d47bf71de452134bf4910.diff LO

[clang] acaf6b9 - [NFC] Add [[maybe_unused]] to avoid warning in gcc9

2022-08-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-19T14:43:22+08:00 New Revision: acaf6b9dc07de3c12c8a1a55fd8674bca547a917 URL: https://github.com/llvm/llvm-project/commit/acaf6b9dc07de3c12c8a1a55fd8674bca547a917 DIFF: https://github.com/llvm/llvm-project/commit/acaf6b9dc07de3c12c8a1a55fd8674bca547a917.diff LO

[clang] 210a419 - [docs] Adjust the example command line in DebuggingCoroutines.rst

2022-08-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-22T22:15:47+08:00 New Revision: 210a4197b4d73388030c63aea6dc51dde3e9166e URL: https://github.com/llvm/llvm-project/commit/210a4197b4d73388030c63aea6dc51dde3e9166e DIFF: https://github.com/llvm/llvm-project/commit/210a4197b4d73388030c63aea6dc51dde3e9166e.diff LO

[clang] 4332b04 - [docs] Add examples for printing asynchronous stack for coroutines

2022-08-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-23T17:37:12+08:00 New Revision: 4332b049edf6ccf98c9e31dcc983760a89f01d40 URL: https://github.com/llvm/llvm-project/commit/4332b049edf6ccf98c9e31dcc983760a89f01d40 DIFF: https://github.com/llvm/llvm-project/commit/4332b049edf6ccf98c9e31dcc983760a89f01d40.diff LO

[clang] 17631ac - [Coroutines] Store the index for final suspend point if there is unwind coro end

2022-08-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-26T14:05:46+08:00 New Revision: 17631ac676bc44b7fd5c79abc66844efb4e1b533 URL: https://github.com/llvm/llvm-project/commit/17631ac676bc44b7fd5c79abc66844efb4e1b533 DIFF: https://github.com/llvm/llvm-project/commit/17631ac676bc44b7fd5c79abc66844efb4e1b533.diff LO

[clang] 7629621 - [Modules] Don't judge if we're compiling a module unit by LangOpts::CurrentModule.empty()

2022-09-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-09-18T16:43:30+08:00 New Revision: 762962174e3adab1a0d744fe2636d4d9fb373c53 URL: https://github.com/llvm/llvm-project/commit/762962174e3adab1a0d744fe2636d4d9fb373c53 DIFF: https://github.com/llvm/llvm-project/commit/762962174e3adab1a0d744fe2636d4d9fb373c53.diff LO

[clang] 298d08d - [NFC] Move the position of CodeGen/module-initializer*.cpp

2022-09-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-09-19T10:36:28+08:00 New Revision: 298d08dfa5509b5fa6595c297c7f9c878b460d29 URL: https://github.com/llvm/llvm-project/commit/298d08dfa5509b5fa6595c297c7f9c878b460d29 DIFF: https://github.com/llvm/llvm-project/commit/298d08dfa5509b5fa6595c297c7f9c878b460d29.diff LO

[clang] b76da14 - [C++] [Modules] Generate the initializer for modules if we compile a

2022-09-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-09-19T11:30:34+08:00 New Revision: b76da14b3bfc1768d3dc9478b167b402a9ec308f URL: https://github.com/llvm/llvm-project/commit/b76da14b3bfc1768d3dc9478b167b402a9ec308f DIFF: https://github.com/llvm/llvm-project/commit/b76da14b3bfc1768d3dc9478b167b402a9ec308f.diff LO

[clang] 327141f - [C++] [Coroutines] Prefer aligned (de)allocation for coroutines -

2022-09-21 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-09-22T11:28:29+08:00 New Revision: 327141fb1d8ca35b323107a43d57886eb77e7384 URL: https://github.com/llvm/llvm-project/commit/327141fb1d8ca35b323107a43d57886eb77e7384 DIFF: https://github.com/llvm/llvm-project/commit/327141fb1d8ca35b323107a43d57886eb77e7384.diff LO

[clang] 1aaba40 - [C++] [Modules] Add a test case for mocking implementation for std modules

2022-09-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-09-23T15:20:46+08:00 New Revision: 1aaba40dcbe8fdc93d825d1f4e22edaa3e9aa5b1 URL: https://github.com/llvm/llvm-project/commit/1aaba40dcbe8fdc93d825d1f4e22edaa3e9aa5b1 DIFF: https://github.com/llvm/llvm-project/commit/1aaba40dcbe8fdc93d825d1f4e22edaa3e9aa5b1.diff LO

[clang] 9974ed8 - [C++20] [Modules] Remove assertion of current module when acting on import

2022-10-08 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-10-08T16:44:51+08:00 New Revision: 9974ed804995d2e34be69404e9904c7e03cfbda4 URL: https://github.com/llvm/llvm-project/commit/9974ed804995d2e34be69404e9904c7e03cfbda4 DIFF: https://github.com/llvm/llvm-project/commit/9974ed804995d2e34be69404e9904c7e03cfbda4.diff LO

[clang] 0c4f0bf - [C++20] [Modules] Only allow redeclarations in partitions if they are in the same module

2022-10-08 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-10-08T17:44:04+08:00 New Revision: 0c4f0bf40d17d516aff54f6cea79b69101085799 URL: https://github.com/llvm/llvm-project/commit/0c4f0bf40d17d516aff54f6cea79b69101085799 DIFF: https://github.com/llvm/llvm-project/commit/0c4f0bf40d17d516aff54f6cea79b69101085799.diff LO

[clang] b72a364 - [C++20] [Coroutines] Exit early if we found co_await appears in

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

[clang] 1104c70 - [C++20] [Coroutines] Add ReleaseNotes about addressing thread identifiaction problems

2022-10-16 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-10-17T10:46:14+08:00 New Revision: 1104c70f96de7abe90b4ff51870ed046862c79fb URL: https://github.com/llvm/llvm-project/commit/1104c70f96de7abe90b4ff51870ed046862c79fb DIFF: https://github.com/llvm/llvm-project/commit/1104c70f96de7abe90b4ff51870ed046862c79fb.diff LO

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