[PATCH] D105877: [Coroutines] Run coroutine passes by default

2021-07-14 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8a1727ba51d2: [Coroutines] Run coroutine passes by default (authored by ChuanqiXu). Herald added a project: clang. Herald added a subscriber: cfe-com

[PATCH] D118352: [clang][ABI] New c++20 modules mangling scheme

2022-03-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D118352#3368919 , @phosek wrote: > We're also seeing this issue on our Mac bots, is it possible to revert it? I've reverted it. Since this is the new feature, I think it wouldn't so hurry to land it. BTW, I think it would b

[PATCH] D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.

2022-03-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I don't know about ObjC. Comments on style/name only. Comment at: clang/include/clang/Serialization/ASTReader.h:1110 + template + using DuplicateDecls = std::pair; + How about change the name to: ``` template using DuplicateO

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Frontend/FrontendOptions.h:157 + unsigned HeaderUnit : 3; + unsigned Header : 1; I prefer `IsHeader` Comment at: clang/include/clang/Frontend/FrontendOptions.h:252 + bool isH

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. BTW, all the tests uses ``clang_cc1`. How should the users do with `clang`? Could them use `-Xclang` only? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121096/new/ https://reviews.llvm.org/D121096 _

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D121096#3369277 , @iains wrote: > In D121096#3368996 , @ChuanqiXu > wrote: > >> BTW, all the tests uses ``clang_cc1`. How should the users do with `clang`? >> Could them use `-Xclan

[PATCH] D121271: [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 414022. ChuanqiXu set the repository for this revision to rG LLVM Github Monorepo. ChuanqiXu added a comment. Herald added a subscriber: cfe-commits. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D121271: [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D121271#3369276 , @iains wrote: > I think you need to extend the test case (and possibly the code) to handle an > implementation partition as well, where the module is both interface and > implementation. Yeah, this is the

[PATCH] D118352: [clang][ABI] New c++20 modules mangling scheme

2022-03-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D118352#3371425 , @h-vetinari wrote: > Something must have gone wrong... communication-wise... as @urnathan seems to > have abandoned (resp. resigned from) all modules PRs. Hope any > misunderstandings or grievances can be

[PATCH] D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.

2022-03-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D121177#3371695 , @vsapsai wrote: > Thanks for the review, Chuanqi! I believe you were touching recently > `isSameEntity`. Do you have any concerns about using > `StructuralEquivalenceContext` instead of `isSameEntity`? I'v

[PATCH] D121095: [C++20][Modules][HU 1/5] Introduce header units as a module type.

2022-03-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM with suggested changes. Comment at: clang/include/clang/Sema/Sema.h:2978-2980 + /// The parser has begun a translation unit to be compiled as a C++20 + /// Heade

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM except we should remove the dead error emitting. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2796-2797 +// not intended to be a module map or header

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Maybe it's worth to add a test from: http://eel.is/c++draft/cpp.import#8 Comment at: clang/include/clang/Serialization/ASTWriter.h:127-128 + /// The module is a header unit. + bool IsHeaderUnit = false; + I think the member is red

[PATCH] D121098: [C++20][Modules][HU 4/5] Handle pre-processed header units.

2022-03-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. It lacks tests. This is not NFC, right? --- I am a little bit confused for the intuition. Couldn't we just import the pre-processed header? What's the problem? Could you elaborate on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.

2022-03-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. OK, if it is prohibited. It looks good to me. Please wait for a few days before landing in case there are other comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM. Although I don't like these option names, it is more important to keep consistent with GCC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > It's not practical to recognise a header without any suffix so -fmodule-header=system foo isn't going to happen. May I ask the reason? It looks not so good with `-fmodule-header=system -xc++-header vector` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D121590: [C++20][Modules][Driver][HU 3/N] Handle foo.h with -fmodule-header and/or C++ invocation.

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. This looks a little bit odd. Is this consistent with GCC too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121590/new/ https://reviews.llvm.org/D121590 ___ cfe-commits mailing

[PATCH] D121591: [C++20][Modules][Driver][HU 4/N] Add fdirectives-only mode for preprocessing output.

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Oh, I found all the series of patches looks confusing to me. Maybe due to that I lack a use experience with header unit. I really couldn't judge if it is necessary or useful. Could you elaborate more **end** use cases? For example, I could understand the sentence: >

[PATCH] D120874: [C++20] [Modules] Use '-' as the separator of partitions when searching in filesystems

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. @iains ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120874/new/ https://reviews.llvm.org/D120874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D121271: [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @iains ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121271/new/ https://reviews.llvm.org/D121271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D120540: [Driver] Enable to use C++20 modules standalone by -fcxx-modules

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @iains ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120540/new/ https://reviews.llvm.org/D120540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a subscriber: urnathan. ChuanqiXu added a comment. Oh, @urnathan resigned from all my patches and I don't know why. @iains @dblaikie could you help to review this one? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120397/new/ https://reviews.llvm.org/D120397 __

[PATCH] D119409: [C++20] [Modules] Remain dynamic initializing internal-linkage variables in module interface unit

2022-03-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119409/new/ https://reviews.llvm.org/D119409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D120540: [Driver] Enable to use C++20 modules standalone by -fcxx-modules

2022-03-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D120540#3381905 , @jansvoboda11 wrote: > I agree. My understanding is that `-fcxx-modules` enables Clang modules that > don't interact with C++20 modules. @Bigcheese, any thoughts? Oh, if it is true, then it is in a chaos

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-03-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. In D121589#3381894 , @iains wrote: > In D121589#3381343 , @ChuanqiXu > wrote: > >>> It's not practical

[PATCH] D121588: [C++20][Modules][Driver][HU 1/N] Initial handling for -xc++-{system,user}-header.

2022-03-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a subscriber: MyDeveloperDay. ChuanqiXu added a comment. In D121588#3381872 , @iains wrote: > note: I do not plan to fix the formatting issue in > clang/lib/Driver/Types.cpp, since I am adding one line and the format change > would mean

[PATCH] D121098: [C++20][Modules][HU 4/5] Handle pre-processed header units.

2022-03-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D121098#3383835 , @iains wrote: >> I am a little bit confused for the intuition. Couldn't we just import the >> pre-processed header? What's the problem? Could you elaborate on this? > > We cannot import a pre-processed file

[PATCH] D120540: [Driver] Enable to use C++20 modules standalone by -fcxx-modules

2022-03-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a subscriber: rsmith. ChuanqiXu added a comment. @rsmith told me that the ideal situation would combine C++20 modules and clang modules together in D113391 I think the most important thing here is to get in consensus for the module status. Here

[PATCH] D121723: [clang] CWG 2354: prohibit alignas for enums

2022-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D121723#3384962 , @Endill wrote: > Can somebody commit this? I don't have commit access. Hi, what's your prefered name and email addressed? I would love to commit it. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D121723: [clang] CWG 2354: prohibit alignas for enums

2022-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa603f566dbe0: [clang] CWG 2354: prohibit alignas for enums (authored by Endill, committed by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121723

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-03-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I've looked into the details as much as I can and I don't find explicit errors. --- It is better to add tests in clang/unittest by using `VarDecl::isNRVOVariable()`. Comment at: clang/include/clang/Sema/Scope.h:533-535 +if (NRVO.getPointer() !=

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I feel good if we could add the test from: http://eel.is/c++draft/cpp.import#8. Comment at: clang/include/clang/Serialization/ASTWriter.h:21 #include "clang/Basic/LLVM.h" +#include "clang/Basic/Module.h" #include "clang/Basic/SourceLocation.h"

[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

2022-03-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2855-2857 + assert((DashX.getHeaderUnit() == InputKind::HeaderUnit_None || + Inputs.size() == 1) && + "Expected only one input file for header unit"); iains w

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-03-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Sema/Scope.h:518 void addNRVOCandidate(VarDecl *VD) { +// every candidate except VD is "spoiled" now, remove them from the set Firstly I am wondering why here doesn't check `NRVO.getInt()`

[PATCH] D121098: [C++20][Modules][HU 4/5] Handle pre-processed header units.

2022-03-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. OK, I feel good if this one contains tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121098/new/ https://reviews.llvm.org/D121098 ___ cfe-commits mailing list cfe-commits@

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-03-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Sema/Scope.h:518 void addNRVOCandidate(VarDecl *VD) { +// every candidate except VD is "spoiled" now, remove them from the set Izaron wrote: > ChuanqiXu wrote: > > Firstly I am wondering wh

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. In D121097#3391698 , @iains wrote: > In D121097#3391236 , @ChuanqiXu > wrote: > >> I feel good if we c

[PATCH] D121271: [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D121271#3394108 , @iains wrote: > it looks like the test case is failing everywhere - perhaps as a result of > changes in the mangling scheme? Oh, yeah... let me try to continue the work in mangling scheme. I feel it is im

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-03-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7832-7833 def err_redeclaration_non_exported : Error < - "cannot export redeclaration %0 here since the previous declaration is not " - "exported">; + "cannot export redeclaration %0

[PATCH] D119409: [C++20] [Modules] Remain dynamic initializing internal-linkage variables in module interface unit

2022-03-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D119409#3396690 , @dblaikie wrote: > Not even necessarily then - if you have code like protobufs (large amounts of > autogenerated code, much of which you might never call) - or even just > libraries where you only use a su

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 417175. ChuanqiXu added a comment. Use Unittest instead of `expected-no-diagnostic` tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120397/new/ https://reviews.llvm.org/D120397 Files: clang/lib/AST/Decl.cpp clang/test/CodeGenCXX/inconsis

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Both `ast-dump` and `ast-dump=json` couldn't solve this. And I feel `static_assert` is hard to implement. But from your wording, I feel a unittest could match the intention. @dblaikie @aaron.ballman I thought the key point here is to test the linkage actually. And I f

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-03-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D122119#3398823 , @iains wrote: > So the adjustment to the error message is something I am 50/50 about (IMO it > makes some messages more useful, but maybe not needed in others). > > Without the change we get > "cannot expo

[PATCH] D122119: [C++20][Modules] Adjust handling of exports of namespaces and using-decls.

2022-03-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D122119#3400032 , @urnathan wrote: > In D122119#3398949 , @ChuanqiXu > wrote: > >> > > > >> The first feeling I saw the change is that not every C++ programmer knows >> about linka

[PATCH] D119409: [C++20] [Modules] Remain dynamic initializing internal-linkage variables in module interface unit

2022-03-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a subscriber: urnathan. ChuanqiXu added a comment. In D119409#3400287 , @dblaikie wrote: > In D119409#3398483 , @ChuanqiXu > wrote: > >> In D119409#3396690

[PATCH] D120874: [C++20] [Modules] Use '-' as the separator of partitions when searching in filesystems

2022-03-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @iains ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120874/new/ https://reviews.llvm.org/D120874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 417479. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120397/new/ https://reviews.llvm.org/D120397 Files: clang/lib/AST/Decl.cpp clang/unittests/AST/DeclTest.cpp Index: clang/unittests/AST/DeclTe

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. In D120397#3399808 , @aaron.ballman wrote: > Can you also add a release note that explains we've fixed the crash? My thought is to edit a release note standalone. Since there are alr

[PATCH] D118034: [C++20] [Modules] Don't complain about duplicated default template argument across modules

2022-04-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118034/new/ https://reviews.llvm.org/D118034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D120540: [Driver] Enable to use C++20 modules standalone by -fcxx-modules

2022-04-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith @Bigcheese gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120540/new/ https://reviews.llvm.org/D120540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[PATCH] D119409: [C++20] [Modules] Remain dynamic initializing internal-linkage variables in module interface unit

2022-04-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D119409#3432281 , @iains wrote: > In D119409#3410893 , @ChuanqiXu > wrote: > >> In D119409#3410868 , @iains wrote: >> >>> In D119409#3410474

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I've read the whole patch. It looks good to me roughly except some style issues and the 2 places you marked as ` Attn Reviewers`. Let's try to fix them one by one. Comment at: clang/lib/Sema/SemaTemplate.cpp:4705 CheckConstraintSatisfaction(

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: erichkeane, aaron.ballman, cor3ntin. ChuanqiXu added a project: clang. Herald added a subscriber: kristof.beyls. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. I found thi

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM basically. Please wait for 1~2 weeks to land this in case there are other comments. Comment at: clang/lib/Sema/SemaConcept.cpp:496-497 + + // Attn Reviewers: we

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I agree this one is better. Comment at: clang/include/clang/Sema/Sema.h:2899-2909 +/// C++ [dcl.fct.def.general]p1 +/// function-body: +/// = delete ; +/// = default ; +Delete, +Default, + Agree to @erichke

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Sema/ScopeInfo.h:843 + /// and the capture should not be visible before. + llvm::DenseMap DelayedCaptures; + I hope the comment explains the meaning of unsigned here. If it means index, I think `

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Sema/Sema.h:2899-2909 +/// C++ [dcl.fct.def.general]p1 +/// function-body: +/// = delete ; +/// = default ; +Delete, +Default, + rZhBoYao wrote: > ChuanqiXu wrote: > > Ag

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 421419. ChuanqiXu added a comment. Address comments: - Add assertions to show the input wouldn't hit the boundaries. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123298/new/ https://reviews.llvm.org/D123298 Files: clang/include/clang/AST/Decl

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > On the other hand, why not use 16 for both? I am consistent with @aaron.ballman here. Comment at: clang/include/clang/AST/DeclTemplate.h:1156-1157 - TemplateParmPosition(unsigned D, unsigned P) : Depth(D), Position(P) {} + static constexpr unsi

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122981/new/ https://reviews.llvm.org/D122981 ___ cfe-commits mailing list cfe-commits

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. I've tried my best to review this one and it looks good to me basically. Since @aaron.ballman plans to review this one. I think it'd better to wait for this respond.

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 422104. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123298/new/ https://reviews.llvm.org/D123298 Files: clang/include/clang/AST/DeclTemplate.h Index: clang/include/clang/AST/DeclTemplate.h ==

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/DeclTemplate.h:1156-1157 - TemplateParmPosition(unsigned D, unsigned P) : Depth(D), Position(P) {} + static constexpr unsigned MaxDepth = (1l << DEPTH_BITWIDTH) -

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D123298#3445131 , @aaron.ballman wrote: > Still LG to me, but please watch the build bots and issues list closely for > any new template instantiation depth/position related issues over the next > short while given that we

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-12 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG36de2d639eca: [NFC] [AST] Reduce the size of TemplateParmPosition (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: iains, rsmith, clang-language-wg. ChuanqiXu added a project: clang. Herald added a subscriber: dexonsmith. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. Now the implement

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 423030. ChuanqiXu added a comment. Fix tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123837/new/ https://reviews.llvm.org/D123837 Files: clang/include/clang/Basic/Module.h clang/lib/Sema/SemaLookup.cpp clang/test/CXX/module/module.imp

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2022-04-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 423044. ChuanqiXu marked 18 inline comments as done. ChuanqiXu added a comment. Herald added a subscriber: MaskRay. Address @rsmith's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 Files: cl

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2022-04-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith Thanks for your valuable input! Comment at: clang/lib/Sema/SemaLookup.cpp:2000-2004 + // Class and enumeration member names can be found by name lookup in any + // context in which a definition of the type is reachable. + if (auto *ECD = dy

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 423542. ChuanqiXu added a comment. Address comments: - Add Cache in isInCurrentModule to avoid too many string comparisons. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123837/new/ https://reviews.llvm.org/D123837 Files: clang/include/clang/B

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/Module.h:537-543 + static StringRef getPrimaryModuleInterfaceName(StringRef Name) { +return Name.split(':').first; + } + /// Get the primary module interface name from a partition. StringRef getPri

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 423572. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123837/new/ https://reviews.llvm.org/D123837 Files: clang/include/clang/Basic/Module.h clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaLoo

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/Module.h:547-548 +// is the default name showed in module map. +if (isGlobalModule()) + return ""; + I thought to add an assertion here. But I feel like it is not so necessary an

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 423579. ChuanqiXu added a comment. Rename Sema::CurrentModuleUnitsCache to Sema::UsableModuleUnitsCache CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123837/new/ https://reviews.llvm.org/D123837 Files: clang/include/clang/Basic/Module.h clang

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:1579 + (M->getPrimaryModuleInterfaceName() == + llvm::StringRef(getLangOpts().CurrentModule).split(':').first)) { +CurrentModuleUnitsCache.insert(M); I thought to add a comm

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 423797. ChuanqiXu added a comment. Address comments: - Add tests for GMF - Avoid to compare string if M is private module fragment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123837/new/ https://reviews.llvm.org/D123837 Files: clang/include

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/Module.h:550-553 if (isModulePartition()) { auto pos = Name.find(':'); return StringRef(Name.data(), pos); } iains wrote: > if we find this is repeated too many times,

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/Decl.h:1891 +TK_DependentFunctionTemplateSpecialization, +// A Dependent function that itself is not a function. +TK_DependentNonTemplate hmmm, what does this literally mean? In my u

[PATCH] D123918: [Pipelines] Remove Legacy Passes in Coroutines

2022-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG483efc9ad04d: [Pipelines] Remove Legacy Passes in Coroutines (authored by ChuanqiXu). Herald added a project: clang. Herald added a subscriber: cfe-c

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D123837#3461474 , @iains wrote: > thanks for multiple iterations! Thanks for the reviewing! > I think maybe you are using a too old clang-format? > it seems that clang-format >= llvm-14 removes spaces around module partiti

[PATCH] D123837: [C++20] [Modules] Judge isInCurrentModule currently

2022-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGce2257d69fd0: [C++20] [Modules] Judge current module correctly (authored by ChuanqiXu). Changed prior to commit: https://reviews.llvm.org/D123837?

[PATCH] D124149: [NFC] follow up code cleanup after D123837

2022-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added a reviewer: iains. ChuanqiXu added a project: clang. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. I found there are chances to do simplify the codes further after I landed D123837

[PATCH] D124149: [NFC] follow up code cleanup after D123837

2022-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:1573 // attached to the global module and usable within the module unit. - if ((M->isGlobalModule() && !M->Parent) || - // If M is the private module fragment, it is usable only if it is within

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2022-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 424107. ChuanqiXu added a comment. Rebase with main. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Basic/LangOptions.def clang/includ

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 406314. ChuanqiXu added a comment. Apply Aaron's opinion in: https://github.com/llvm/llvm-project/issues/53413#issuecomment-1024910619. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115867/new/ https://reviews.llvm.org/D115867 Files: clang/inc

[PATCH] D117087: [C++20] [Coroutines] Implement return value optimization for get_return_object

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117087/new/ https://reviews.llvm.org/D117087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 406315. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115610/new/ https://reviews.llvm.org/D115610 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaModule.cpp clang/test/CXX/module/modul

[PATCH] D118437: [NFC] [Modules] Refactor ODR checking for default template argument in ASTReader

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118437/new/ https://reviews.llvm.org/D118437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D118608: [NFC] Increase initial size of FoldingSets used in ASTContext and CodeGenTypes

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118608/new/ https://reviews.llvm.org/D118608

[PATCH] D118437: [NFC] [Modules] Refactor ODR checking for default template argument in ASTReader

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:10176-10184 +if (auto *TTP = dyn_cast(D)) + return TTP->hasDefaultArgument() && + !TTP->defaultArgumentWasInherited(); +if (auto *NTTP = dy

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe39ba0461757: [C++20] [Coroutines] Warning for always_inline coroutine (authored by ChuanqiXu). Changed prior to commit: https://reviews.llvm.org/D115867?vs=406314&id=406684#toc Repository: rG LLVM G

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Although this wasn't accepted formally, both @urnathan and @rsmith says this looks good to them. So I guess it might not be bad to land this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115610/new/ https://reviews.llvm.org/D115610 _

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG3504937dfb2b: [C++20] [Modules] Don't create multiple global module fragment (authored by ChuanqiXu). Repository: rG LL

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2022-02-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D115610#3304289 , @urnathan wrote: > the landed version is good, with Richard's suggested member name change. > Can't see a way of post-commit accepting? Yeah, maybe we can't do post-commit accept formally. Repository:

[PATCH] D118437: [NFC] [Modules] Refactor ODR checking for default template argument in ASTReader

2022-02-09 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8c930cef0e4c: [NFC] [Modules] Refactor ODR checking for default template argument in (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo

[PATCH] D119409: [C++20] [Modules] Remain variable's definition in module interface

2022-02-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, iains, urnathan, dblaikie. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. This fixes issue51873 . The issu

[PATCH] D119426: [C++20] [Modules] Check if modulemap exists to avoid crash in implicit used C++ module

2022-02-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM. It should be always good to avoid crash. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119426/new/ https://reviews.llvm.org/D119426 __

[PATCH] D119409: [C++20] [Modules] Remain variable's definition in module interface

2022-02-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 408315. ChuanqiXu added a comment. Update test about inline variable in module CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119409/new/ https://reviews.llvm.org/D119409 Files: clang/lib/Serialization/ASTWriterDecl.cpp clang/test/CXX/modules-

[PATCH] D119409: [C++20] [Modules] Remain variable's definition in module interface

2022-02-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 408317. ChuanqiXu added a comment. Handle named module explicitly for better readability. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119409/new/ https://reviews.llvm.org/D119409 Files: clang/lib/Serialization/ASTWriterDecl.cpp clang/test/C

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