[PATCH] D127626: [docs] Add document "Debugging C++ Coroutines"

2022-07-07 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 rG1934b3ae59a7: [docs] Add document "Debugging C++ Coroutines" (authored by ChuanqiXu). Herald added a project: clang. Herald added a subscriber: cfe-c

[PATCH] D129068: [AST] Accept identical TypeConstraint referring to other template parameters.

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 443141. ChuanqiXu retitled this revision from "[AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter" to "[AST] Accept identical TypeConstraint referring to other template parameters.". Chua

[PATCH] D129068: [AST] Accept identical TypeConstraint referring to other template parameters.

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129068#3637716 , @vsapsai wrote: > After looking at this change more, I was thinking about changing the title > from **how** to **what** you are doing. For example, something like "[AST] > Accept identical TypeConstraint r

[PATCH] D129104: [Modules] Add ODR Check for concepts

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:6533 + const Expr *YCE = ConceptY->getConstraintExpr(); + assert(XCE && YCE && "ConceptDecl without constraint expression?"); + llvm::FoldingSetNod

[PATCH] D128974: [RFC] [AST] [Modules] Handle full cases of DefaultArgStorage::setInherited

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 443147. ChuanqiXu retitled this revision from "[AST] [Modules] Handle full cases of DefaultArgStorage::setInherited" to "[RFC] [AST] [Modules] Handle full cases of DefaultArgStorage::setInherited". ChuanqiXu edited the summary of this revision. ChuanqiXu ad

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-07-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11155 +def err_export_inline_not_defined : Error< + "exported inline functions must be defined within the module purview" + " and before any private module fragment">;

[PATCH] D126694: [C++20][Modules] Implementation of GMF decl elision.

2022-07-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D126694#3638069 , @iains wrote: > In D126694#3637690 , @ChuanqiXu > wrote: > >> In D126694#3635207 , @iains wrote: >> >>> @rsmith, @ChuanqiX

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

2022-03-23 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 D122119#3402168 , @urnathan wrote: > In D122119#3401322 , @ChuanqiXu > wrote: > >> > > > >> I thin

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

2022-03-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @vsapsai @dblaikie I want to make sure if this one would affect clang modules. Or simply, would the name of clang modules contain `:`? (`:` is the separator of C++20 modules partitions.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120874/new/ https://revie

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

2022-03-23 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG847466860887: [C++20] [Modules] Make the linkage consistent for template and its (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12039

[PATCH] D122413: [C++20][Modules] Limit ModuleInternalLinkage to modules-ts.

2022-03-24 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/D122413/new/ https://reviews.llvm.org/D122413

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

2022-03-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D120874#3406954 , @vsapsai wrote: > By the way, tried a module name with a colon and ModuleMapParser doesn't > accept it > > include/module.modulemap:1:12: error: skipping stray token > module Test:Colon { >

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

2022-03-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D119409#3405733 , @dblaikie wrote: > is this an issue for Clang Header Modules codegen too? (maybe the solution > should be the same for both, then) For my limited knowledge to clang header modules, `.modulemap` is a necess

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

2022-03-27 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D119409#3409806 , @iains wrote: > I think that this problem might well be a consequence of the bug which is > fixed by D122413 . > > We have been generating code with module internal entitie

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

2022-03-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D119409#3410868 , @iains wrote: > In D119409#3410474 , @ChuanqiXu > wrote: > >> In D119409#3409806 , @iains wrote: >> >>> I think that this

[PATCH] D122620: [clang][DR] Test and mark DR1479 as complete

2022-03-28 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/D122620/new/ https://reviews.llvm.org/D122620

[PATCH] D122682: [clang][DR] Add test for DR1227 and mark it as complete

2022-03-29 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/D122682/new/ https://reviews.llvm.org/D122682

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

2022-03-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 419322. ChuanqiXu added a comment. Herald added a subscriber: dexonsmith. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120874/new/ https://reviews.llvm.org/D120874 Files: clang/include/clang/Basic/Module.h clang/lib/Serialization/ASTW

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

2022-03-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 419324. ChuanqiXu added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120874/new/ https://reviews.llvm.org/D120874 Files: clang/lib/Lex/HeaderSearch.cpp clang/test/Modules/search-partitions.cpp Index: clang/test/Modules/se

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

2022-03-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 419325. ChuanqiXu added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121271/new/ https://reviews.llvm.org/D121271 Files: clang/include/clang/Basic/Module.h clang/lib/Serialization/ASTWriterDecl.cpp clang/test/CodeGenCXX/p

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

2022-03-30 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 rGee572129ae15: [C++20] [Modules] Use '-' as the separator of partitions when searching (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo

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

2022-03-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I've just skimmed over the patch and it is a little bit hard to understand for people who don't have a strong background. Is it possible to split this one into several parts? Comment at: clang/lib/Sema/Scope.cpp:72 + // Lambdas have an extra protot

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-03-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I am interested in this one. But it is absolutely not easy to understand... Comment at: clang/include/clang/Sema/Sema.h:6991-6993 /// \param TemplateArgs the list of template arguments to substitute into the - /// constraint expression. + /// con

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

2022-03-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 419603. ChuanqiXu added a comment. Specify itanium_abi_triple to make CI on windows passes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121271/new/ https://reviews.llvm.org/D121271 Files: clang/include/clang/Basic/Module.h clang/lib/Seriali

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-03-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. BTW, it looks like the patch needs to rebase with main so that other people could play it self if interested. Comment at: clang/lib/Sema/SemaConcept.cpp:489 + // Attn Reviewers: we need to do this for the function constraints for + // comparison of

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

2022-03-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @iains now it passes the CI! 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.llvm.org/cgi-bin/mailman/

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

2022-03-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Herald added a subscriber: MaskRay. @rsmith @Bigcheese gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120540/new/ https://reviews.llvm.org/D120540 ___ cfe-commits m

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

2022-03-31 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] D121271: [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-31 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3cec39b91c50: [C++20] [Modules] Don't generate strong function of a partition in importing… (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

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

2022-04-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 419649. ChuanqiXu added a reviewer: MaskRay. ChuanqiXu added a comment. Herald added a subscriber: StephenFan. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120540/new/ https://reviews.llvm.org/D120540 Files: clang/include/cla

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14457 // The return type of a function definition must be complete - // (C99 6.9.1p3, C++ [dcl.fct]p6). + // unless the function is deleted + // (C99 6.9.1p3, C++ [dcl.fct.def.general]p2).

[PATCH] D122885: [clang] Draft: Implement P1703R1

2022-04-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. BTW, I think it is helpful to add @iains's patches as parent versions to avoid conflicting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122885/new/ https://reviews.llvm.org/D122885

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:489 + // Attn Reviewers: we need to do this for the function constraints for + // comparison of constraints to work, but do we also need to do it for + // CheckInstantiatedFunctionConstraints? That on

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14461 if (!ResultType->isDependentType() && !ResultType->isVoidType() && - !FD->isInvalidDecl() && + !FD->isInvalidDecl() && !FnDeleted && RequireCompleteType(FD->getLocation(), ResultTyp

[PATCH] D122885: [clang] Draft: Implement P1703R1

2022-04-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D122885#3431618 , @tbaeder wrote: > What patches are you talking about exactly? I mean D121588 D121589 D121590 D12159

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

2022-04-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D119136#3421531 , @cor3ntin wrote: > In D119136#3418585 , @ChuanqiXu > wrote: > >> I've just skimmed over the patch and it is a little bit hard to understand >> for people who don't

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D122981#3432233 , @rZhBoYao wrote: > I think an extra parameter is inevitable without complicating things too much. My thought is that it might not be worth to fix the problem for the workaround. I feel like the problem is

[PATCH] D130331: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Sorry for the frequent ping since 15.x is going to be branched. @aaron.ballman @tahonermann I know this might not look good to you. But I want to ask if there is any objection? Personally, the preferred_name attribute is not so important and it blocks something import

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

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if

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

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

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

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

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

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

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

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

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

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

[PATCH] D129174: [C++20][Modules] Update ADL to handle basic.lookup.argdep p4 [P1815R2 part 1]

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. FYI When I implements/tests the modularized STL for libstdc++ (https://github.com/ChuanqiXu9/stdmodules), I find the patch blocks it. Due to the time is limited (I really wish we could have something workable in clang15), I made a pre-review commit in: https://githu

[PATCH] D129138: [clang] [docs] Update the changes of C++20 Modules in clang15

2022-07-26 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 D129138#3674619 , @iains wrote: > In D129138#3670708 , @ChuanqiXu > wrote: > >> @iains I'm going to

[PATCH] D129138: [clang] [docs] Update the changes of C++20 Modules in clang15

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc73adbad6a99: [clang] [docs] Update the changes of C++20 Modules in clang15 (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129138/new

[PATCH] D130331: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:4353 + // https://github.com/llvm/llvm-project/issues/56490 for example. + if (!A || (isa(A) && Writer->isWritingNamedModules())) return Record.push_back(0); tahonermann wro

[PATCH] D129748: [C++20] [Modules] Warn for the use of preferred_name in modules

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu abandoned this revision. ChuanqiXu added a comment. Abandon this since we're prefer D130331 , thanks for every one here! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129748/new/ https://reviews.llvm.org/D129748 _

[PATCH] D130331: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

2022-07-26 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 rGa2772fc806af: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface (authored by ChuanqiXu). Changed prior to commit: htt

[PATCH] D130585: [Sema] Return primary merged decl as canonical for concepts

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D130585#3680189 , @ilya-biryukov wrote: > I wonder whether the right fix for this should generalize to `Mergeable`. > The fact that `Mergeable::getFirstDecl` checks if the decl is coming from the > AST file before looking u

[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added a reviewer: ilya-biryukov. ChuanqiXu added a project: clang. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. I found this one when I try to add a C++20 Modules example for D130585

[PATCH] D130585: [Sema] Return primary merged decl as canonical for concepts

2022-07-26 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 added a C++20 Named Modules tests for this (and some trivial change) in D130614 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 448246. ChuanqiXu added a comment. - Address comment. - Add Sema::CheckRedefinitionInModule CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130614/new/ https://reviews.llvm.org/D130614 Files: clang/include/clang/Basic/Module.h clang/include/cla

[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. In D130614#3681881 , @ilya-biryukov wrote: > Thanks! Mostly questions to better understand the spec and clang. Please > excuse me if they sound too basic. > I have read the modules s

[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D130689#3684333 , @thieta wrote: > In D130689#3684330 , @mehdi_amini > wrote: > >> What does it mean exactly? We can't use **anything** C++17 without writing >> it in the coding sta

[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. BTW, I've sent a NFC test to show the current behavior for functions, classes and variables are basically fine: https://github.com/llvm/llvm-project/commit/fe1887da36c63f64903de112f2a8e88f973318fa CHANGES SINCE LAST ACTION

[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 448504. ChuanqiXu marked 3 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130614/new/ https://reviews.llvm.org/D130614 Files: clang/include/clang/Basic/Module.h clang/includ

[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D130614#3685142 , @ilya-biryukov wrote: > Thanks for the thorough explanation and testing. > LGTM. Thanks for reviewing! Comment at: clang/lib/Sema/SemaDecl.cpp:1747 + + Module *NewM = New->getOwningMod

[PATCH] D128490: [ODRHash diagnostics] Transform method `ASTReader::diagnoseOdrViolations` into a class `ODRDiagsEmitter`. NFC.

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:9577-9584 +static std::string getOwningModuleNameForDiagnostic(const Decl *D) { + // If we know the owning module, use it. + if (Module *M = D->getImportedOwningModule()) +return M->getFullMo

[PATCH] D128695: [ODRHash diagnostics] Move `ODRDiagsEmitter` to libAST in separate files. NFC.

2022-07-28 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. If the code motion is helpful for further changes, it should be good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128695/new/ https://re

[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

2022-07-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu closed this revision. ChuanqiXu added a comment. This is not automated closed by https://github.com/llvm/llvm-project/commit/4d9251bd780d20eebbcb124608b36a69787d5575 due to a typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130614/new/ https://reviews.llvm.org/D130614 __

[PATCH] D128490: [ODRHash diagnostics] Transform method `ASTReader::diagnoseOdrViolations` into a class `ODRDiagsEmitter`. NFC.

2022-07-31 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 then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128490/new/ https://reviews.llvm.org/D128490 ___

[PATCH] D125291: Introduce @llvm.threadlocal.address intrinsic to access TLS variable

2022-07-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 448904. ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125291/new/ https://reviews.llvm.org/D125291 Files: llvm/docs/LangRef.rst llvm/include/llvm/Analysi

[PATCH] D125291: Introduce @llvm.threadlocal.address intrinsic to access TLS variable

2022-07-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D125291#3687295 , @nikic wrote: > LG. Now that LLVM 15 has branched, I think it is safe to land this, and there > will be enough time before LLVM 16 to convert it to the token variant. Yeah, thanks for reviewing! CHANGES

[PATCH] D125291: Introduce @llvm.threadlocal.address intrinsic to access TLS variable

2022-07-31 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 rG970105351710: Introduce @llvm.threadlocal.address intrinsic to access TLS variable (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo C

[PATCH] D130864: [NFC] Introduce ASTContext::isInSameModule()

2022-07-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: iains, ilya-biryukov, erichkeane. ChuanqiXu added a project: clang-modules. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously, when

[PATCH] D130871: [C++20] [Modules] Handle initializer for Header Units

2022-08-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added a reviewer: iains. ChuanqiXu added a project: clang-modules. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously when we add module initializer,

[PATCH] D130871: [C++20] [Modules] Handle initializer for Header Units

2022-08-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2524-2525 for (Decl *D : getContext().getModuleInitializers(GMF)) { - assert(D->getKind() == Decl::Var && "GMF initializer decl is not a var?"); + if (isa(D)) +continue; +

[PATCH] D130871: [C++20] [Modules] Handle initializer for Header Units

2022-08-01 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb6152ad66d7: [C++20] [Modules] Handle initializer for Header Units (authored by ChuanqiXu). Changed prior to commit: https://reviews.llvm.org/D130871?vs=448931&id=449172#toc Repository: rG LLVM Gith

[PATCH] D130864: [NFC] Introduce ASTContext::isInSameModule()

2022-08-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 449173. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130864/new/ https://reviews.llvm.org/D130864 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/Sema/Sema.h clang/lib/AST/ASTCon

[PATCH] D130864: [NFC] Introduce ASTContext::isInSameModule()

2022-08-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:6232 + + auto getHashValueForPrimaryModule = [this](const Module *M) { +if (!PrimaryModuleHash.count(M)) erichkeane wrote: > Doesn't `FindAn

[PATCH] D130864: [NFC] Introduce ASTContext::isInSameModule()

2022-08-02 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu planned changes to this revision. ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. In D130864#3693019 , @ilya-biryukov wrote: > Thanks for working on this. I have a few major concerns here: > > - Do we know that it's a bot

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: iains, urnathan, erichkeane, aaron.ballman, tahonermann, ilya-biryukov, Mordante, tschuett, philnik. ChuanqiXu added projects: clang-modules, clang-language-wg. Herald added a subscriber: arphaman. Herald added a project: All. ChuanqiXu r

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:377-393 + │ │ ││ + ├─ frontend ─┼─

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:468-469 + +(This may be an implementation defect. Although we could argue that header units have no name according to the spec, +it is natural that we couldn't search it. But this is not user friendly

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 449657. ChuanqiXu added a comment. Remove the discussion about the difference about macro in clang module and header units since we need more discussion about it. And the discussion is not necessary about the docs. CHANGES SINCE LAST ACTION https://rev

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 449898. ChuanqiXu marked 15 inline comments as done. ChuanqiXu edited the summary of this revision. ChuanqiXu added a comment. - Address comments. - Tested with `make docs-clang-html`. - Add `Known Problems` section. CHANGES SINCE LAST ACTION https://rev

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:18 + +There is already a detailed document about clang modules Modules_, it +should be helpful to read Modules_ if you want to know more about the general Mordante wrote: > Is `Modules

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:377-393 + │ │ ││ + ├─ frontend ─┼─

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131062#3697193 , @Mordante wrote: > Thanks a lot for working on this! > > I wonder whether it would be better to have some of the more technical > information in a separate file and let this file mainly have an introduction

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131062#3699341 , @h-vetinari wrote: > Aside from a couple typos, I was wondering if it would be welcome to do a > pass w.r.t stylistic improvements (e.g. "Modules have a lot of meanings." --> > "The term 'modules' has a l

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a reviewer: h-vetinari. ChuanqiXu marked 45 inline comments as done. ChuanqiXu added a comment. In D131062#3704017 , @h-vetinari wrote: >> It would be greatly welcome for such comments! > > OK, here goes. Sorry for the large volume of com

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 450692. ChuanqiXu marked 8 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131062/new/ https://reviews.llvm.org/D131062 Files: clang/docs/CPlusPlus20Modules.rst clang/docs/in

[PATCH] D131258: [Sema] Merge variable template specializations

2022-08-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. When I run this locally, it emits several unexpected errors: While building module 'library': In file included from :2: /disk2/workspace.xuchuanqi/llvm-project-for-work/build/tools/clang/test/Modules/Output/merge-var-template-spec.cpp.tmp/var2.h:4:32: error: red

[PATCH] D131258: [Sema] Merge variable template specializations

2022-08-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/Modules/merge-var-template-spec-cxx-modules.cpp:18-23 +template constexpr T zero = 0; // expected-error-re {{declaration{{.*}}in the global module follows declaration in module var_def}} +

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 8 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:316-317 + +Currently Clang would accept the above example. But it may produce surprising results if the +debugging code depends on consistent use of ``NDEBU

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 450731. ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131062/new/ https://reviews.llvm.org/D131062 Files: clang/docs/CPlusPlus20Modules.rst clang/docs/in

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131062#3705767 , @h-vetinari wrote: > It gets very confusing that phab now attaches the old review comments in the > wrong place. Yeah, I am also worrying if the comments may block other reviewers to review. Do you know

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:676-678 +So the final answer for why we don't reuse the interface of Clang modules for header units is that +we've see some differences between header units and Clang modules and we think the differe

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:676-678 +So the final answer for why we don't reuse the interface of Clang modules for header units is that +we've see some differences between header units and Clang modules and we think the differe

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: iains, urnathan, erichkeane, aaron.ballman, tahonermann, ilya-biryukov, Mordante, tschuett, philnik, cpplearner, h-vetinari. ChuanqiXu added projects: clang-modules, clang-language-wg, clang. Herald added a subscriber: arphaman. Herald ad

[PATCH] D131062: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu abandoned this revision. ChuanqiXu added a comment. Let's review it in https://reviews.llvm.org/D131388 later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131062/new/ https://reviews.llvm.org/D131062 ___ cfe-commits mailing list

[PATCH] D131258: [Sema] Merge variable template specializations

2022-08-08 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 then. Comment at: clang/test/Modules/merge-var-template-spec-cxx-modules.cpp:18-23 +template constexpr T zero = 0; // expected-error-re {{declaration{{.*}}in the

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 8 inline comments as done. ChuanqiXu added a comment. In D131388#3706072 , @h-vetinari wrote: > Thanks! Repeating a point that might have been overlooked from D131062 > (this time not as comments in th

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 451030. ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/CPlusPlus20Modules.rst clang/docs/in

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:70-76 +* Primary module interface unit. + +* Module implementation unit. + +* Module partition interface unit. + +* Module partition implementation unit. ruoso wrote: > The terminology

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 451361. ChuanqiXu marked 13 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/CPlusPlus20Modules.rst clang/docs/i

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a reviewer: dblaikie. ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:31 + +This document was intended to be a manual first and foremost, however, we consider it helpful to +introduce some language background here for readers who ar

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-08-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D126907#3710656 , @erichkeane wrote: > Ok, fixed the test failure in clang, AND it managed to fix > all the failures in libcxx! > > HOWEVER, it appears that libcxx/test/libcxx/modules_include.sh.cpp > is now hanging? > > I

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