[PATCH] D148506: [C++] Don't filter using declaration when we perform qualified look up

2023-04-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, erichkeane, aaron.ballman, cor3ntin, clang-language-wg. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Close https://github.com/llv

[PATCH] D148506: [C++] Don't filter using declaration when we perform qualified look up

2023-04-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:1824-1826 +static bool isUsingDeclAtClassScope(NamedDecl *D) { + if (D->getDeclContext()->isFileContext()) +return false; This is the ad-hoc change. Look at the following comment. ===

[PATCH] D147417: [clang-tidy] Do not emit bugprone-exception-escape warnings from coroutines

2023-05-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147417/new/ https://reviews.llvm.org/D147417 ___ cfe-commits mailing list cfe-comm

[PATCH] D137526: [C++20] [Modules] [NFC] Add Preprocessor methods for named modules - for ClangScanDeps (1/4)

2023-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 rG6470706bc0ed: [C++20] [Modules] [NFC] Add Preprocessor methods for named modules - for… (authored by ChuanqiXu). Herald added a project: clang. Heral

[PATCH] D137527: [C++20] [Modules] [ClangScanDeps] Add ClangScanDeps support for C++20 Named Modules in P1689 format (2/4)

2023-02-09 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 landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGde17c665e3f9: [C++20] [Modules] [ClangScanDeps] Add ClangScanDeps

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-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 rG591fdcde9213: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified… (authored by ChuanqiXu). Changed prior to commit: http

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-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 rGe1354763b6e6: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file… (authored by ChuanqiXu). Changed prior to commit: http

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-02-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D139168#4119190 , @vvereschaka wrote: > @ChuanqiXu, > > would you provide a complete rollback for the changes and fix the > `C1689.cppm` test failures on the builders > > - > https://lab.llvm.org/buildbot/#/builders/119/bu

[PATCH] D137527: [C++20] [Modules] [ClangScanDeps] Add ClangScanDeps support for C++20 Named Modules in P1689 format (2/4)

2023-02-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137527#4117675 , @uabelho wrote: > Hi, > > There seems to be something funny going on with the > > ClangScanDeps/P1689.cppm > > testcase added in this patch. > > It fails randomly for me on top of tree (4ad8f7a189570 >

[PATCH] D137527: [C++20] [Modules] [ClangScanDeps] Add ClangScanDeps support for C++20 Named Modules in P1689 format (2/4)

2023-02-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 496821. ChuanqiXu added a comment. While I failed to reproduce the failure in my local environment, I found a thread-safe defect in my code. I forgot to add a Lock for `P1689::addRules`. I'd like to recommit this one and see if the bot would still complain

[PATCH] D137527: [C++20] [Modules] [ClangScanDeps] Add ClangScanDeps support for C++20 Named Modules in P1689 format (2/4)

2023-02-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 496823. ChuanqiXu added a comment. Add `unsupported: windows`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137527/new/ https://reviews.llvm.org/D137527 Files: clang/include/clang/Tooling/DependencyScanning/DependencyScanningService.h clang/

[PATCH] D137526: [C++20] [Modules] [NFC] Add Preprocessor methods for named modules - for ClangScanDeps (1/4)

2023-02-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137526#4125578 , @nikic wrote: > It looks like this causes a minor compile-time regression (about 0.2% on `O0` > builds): > http://llvm-compile-time-tracker.com/compare.php?from=ad81d019a62d33e5d1f232844b83d3e164e4b160&to=

[PATCH] D137526: [C++20] [Modules] [NFC] Add Preprocessor methods for named modules - for ClangScanDeps (1/4)

2023-02-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/unittests/Lex/CMakeLists.txt:21 clangBasic + clangFrontend clangLex ChuanqiXu wrote: > thakis wrote: > > It seems strange layering-wise that the Lex unit tests would depend on > > Frontend. Is there any w

[PATCH] D144157: Add 128-bit integer support to enum element

2023-02-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > debian build bot won't let me pass, so I clang-formatted the function > ActOnEnumBody You can try `git diff -U0 --no-color --relative HEAD^ | clang/tools/clang-format/clang-format-diff.py -p1 -i` to format the changed part only. Currently there are many untouched p

[PATCH] D144188: Tighten up a modules test

2023-02-16 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. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144188/new/ https://reviews.llvm.org/D144188 ___ cfe-commits mailing lis

[PATCH] D144497: [clang][doc] Removes obsolete comment.

2023-02-21 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. Sorry. My bad for forgetting this. Thank you very much! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144497/new/ https://reviews.llvm.org

[PATCH] D144626: [C++20] [Modules] Provide OriginalTrailingRequiresClause for serializer to perform ODR-Checking correctly

2023-02-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: erichkeane, cor3ntin, royjacobson, clang-language-wg. 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

[PATCH] D144680: [Coroutines] Avoid creating conditional cleanup markers in suspend block

2023-02-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. The test should be required here. Comment at: clang/lib/CodeGen/CGExpr.cpp:544 // so that it's unconditional. Don't do this with sanitizers which need // more precise lifetime marks. ConditionalEvaluation *OldConditional = nullptr

[PATCH] D144680: [Coroutines] Avoid creating conditional cleanup markers in suspend block

2023-02-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. BTW, what is the conclusion for the concern about sanitizers? Would change make sanitizers to perform false positive diagnostics? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144680/new/ https://reviews.llvm.org/D144680

[PATCH] D144626: [C++20] [Modules] Provide OriginalTrailingRequiresClause for serializer to perform ODR-Checking correctly

2023-02-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 500046. ChuanqiXu added a comment. Address comments: - Don't store the original trailing require clause. Trying to get the trailing require clause of the primary template function when ODR checking instead. CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D144626: [C++20] [Modules] Trying to compare the trailing require clause of the primary template when performing ODR checking

2023-02-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Yeah, it looks better indeed to not store additional information. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144626/new/ https://reviews.llvm.org/D144626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D144707: [C++20] [Modules] Deprecate to load C++20 Named Modules eagerly

2023-02-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: iains, dblaikie, Bigcheese. ChuanqiXu added a project: clang-modules. Herald added a subscriber: jvesely. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a project: clang. Herald added a subscriber: c

[PATCH] D144707: [C++20] [Modules] Deprecate to load C++20 Named Modules eagerly

2023-02-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. For example, the issue (https://github.com/llvm/llvm-project/issues/60085) disappears after we change the eagerly loading to lazily loading. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144707/new/ https://reviews.llvm.

[PATCH] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

2023-05-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/Modules/Inputs/implicit-module-header-maps/a.h:1-3 +#ifdef FOO +#error foo +#endif It would be better to use `split-file` to merge the segments of the tests. You can find the example in the Modules director

[PATCH] D148506: [C++] Don't filter using declaration when we perform qualified look up

2023-05-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 520047. ChuanqiXu added a comment. Code cleanup and gentle ping~. Given this is small and innocent, I'd like to land this in 2 weeks if no comments come in. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148506/new/ https://reviews.llvm.org/D14850

[PATCH] D150001: [clang] Fix initializer_list matching failures with modules

2023-05-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150001/new/ https://reviews.llvm.org/D150001 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D148506: [C++] Don't filter using declaration when we perform qualified look up

2023-05-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 521196. ChuanqiXu added a comment. Address comments and thank you for reviewing this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148506/new/ https://reviews.llvm.org/D148506 Files: clang/lib/Sema/SemaDecl.cpp clang/test/Modules/pr62158.cpp

[PATCH] D148506: [C++] Don't filter using declaration when we perform qualified look up

2023-05-10 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 rG6e85d2708115: [C++] Don't filter using declaration when we perform qualified look up (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo

[PATCH] D149850: [Clang][Modules] Support `requires cplusplus20` in a modulemap

2023-05-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM. Sorry for misleading. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149850/new/ https://reviews.llvm.org/D149850 ___ cfe-commits mailing

[PATCH] D148515: [Modules] Do not rewrite existing decls when deserializing class fields

2023-04-17 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. Thank you very much! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148515/new/ https://reviews.llvm.org/D148515 _

[PATCH] D148506: [C++] Don't filter using declaration when we perform qualified look up

2023-04-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148506/new/ https://reviews.llvm.org/D148506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D152330: [clang-tidy] Check functions called from catch blocks

2023-06-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro.cpp:132-136 if constexpr (ThrowInUnhandledException) { throw 1; +} else if constexpr (RethrowInUnhandledException) { + throw; } --

[PATCH] D152274: [clang] Don't create import decls without -fmodules

2023-06-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/Modules/getSourceDescriptor-crash.cpp:2 +// RUN: rm -rf %t +// RUN: %clang_cc1 -I %S/Inputs/getSourceDescriptor-crash -S -emit-llvm -debug-info-kind=limited -debugger-tuning=lldb -fmodules -fmodules-cache-path=%t -fimplici

[PATCH] D152330: [clang-tidy] Check functions called from catch blocks

2023-06-06 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. And please wait for several days for other reviewers. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro.cpp:132-136 if c

[PATCH] D152416: add -dump-tokens-bg option for clang

2023-06-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. What is the intended use case of this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152416/new/ https://reviews.llvm.org/D152416 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D152416: add -dump-tokens-bg option for clang

2023-06-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I think such requirement should be done by something like a plugin or an analysis tool by using clang as a library instead of implementing it in clang compiler itself directly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D152416: add -dump-tokens-bg option for clang

2023-06-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D152416#4404862 , @Anarion-zuo wrote: > I see that plugin is a more elegant way of doing this. Do you still want this > as a part of LLVM? No, I don't feel this is needed. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D152746: [C++20][Modules] Complete implementation of module.import p7.

2023-06-12 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. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152746/new/ https://reviews.llvm.org/D152746

[PATCH] D150023: [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other module unit

2023-06-13 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 rGd8a36b00d198: [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other… (authored by ChuanqiXu). Herald added a project: clang.

[PATCH] D150023: [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other module unit

2023-06-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Thanks for keeping the bot green. I see the failure comes from an ABI difference showed up in the test case. I'll try to address it and land it again later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150023/new/ http

[PATCH] D153003: [ODRHash] Fix ODR hashing of template names

2023-06-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. This looks not so good. In this way, we can't disambiguate other template types. At least we added the kind and a TODO here. BTW, the attached test case is in fact in correct. See https://eel.is/c++draft/basic.def.odr#14.3, such mergeable declarations shouldn't be at

[PATCH] D153003: [ODRHash] Fix ODR hashing of template names

2023-06-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D153003#4424004 , @Hahnfeld wrote: > In D153003#4423926 , @ChuanqiXu > wrote: > >> This looks not so good. In this way, we can't disambiguate other template >> types. At least we ad

[PATCH] D153038: [Clang] Fixes a diagnostic typo.

2023-06-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. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153038/new/ https://reviews.llvm.org/D153038 __

[PATCH] D153003: [ODRHash] Fix ODR hashing of template names

2023-06-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > what I'm asking is why we need to differentiate between the two, ie in which > cases do we want these two to have a different hash? I don't understand. It should a basic requirement for different AST entities to have different values. > The way I understand your st

[PATCH] D153114: [WIP] [clangd] [C++20] [Modules] Support C++20 modules for clangd

2023-06-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. Herald added subscribers: kadircet, arphaman, javed.absar. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. https://reviews.llvm.org/D

[PATCH] D153114: [WIP] [clangd] [C++20] [Modules] Support C++20 modules for clangd

2023-06-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 532056. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153114/new/ https://reviews.llvm.org/D153114 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extra/clangd/ClangdLSPServer.h clang-

[PATCH] D153003: [ODRHash] Fix ODR hashing of template names

2023-06-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > I was thinking to "solve" this by making them hash to the same value, but I'm > hearing that using ODRHash for this purpose is the wrong approach to begin > with? We can't say this abstractly. It should be fine to work in ODRHash for C++20 modules issues as long as

[PATCH] D153003: [ODRHash] Fix ODR hashing of template names

2023-06-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D153003#4427731 , @Hahnfeld wrote: >> We can't say this abstractly. It should be fine to work in ODRHash for C++20 >> modules issues as long as we don't lose informations. > > I honestly don't understand this: For the approa

[PATCH] D153114: [clangd] [C++20] [Modules] Support C++20 modules for clangd

2023-06-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > That said, there are two large issues that I think should be addressed in the > design (though not necessarily *implemented* now). Yeah, totally agreed. Design is pretty important especially in open source softwares. I'm pretty open to the suggestions. --- > suppo

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2022-12-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/ClangScanDeps/P1689.cppm:155 +// CHECK-MAKE: [[PREFIX]]/impl_part.o: +// CHECK-MAKE: [[PREFIX]]/impl_part.cppm ben.boeckel wrote: > For scanning, this cannot be the object file. The output needs to be th

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2022-12-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/ClangScanDeps/P1689.cppm:155 +// CHECK-MAKE: [[PREFIX]]/impl_part.o: +// CHECK-MAKE: [[PREFIX]]/impl_part.cppm ben.boeckel wrote: > ChuanqiXu wrote: > > ben.boeckel wrote: > > > For scanning, this cannot

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2022-12-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 480329. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139168/new/ https://reviews.llvm.org/D139168 Files: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h clang/lib/Tooling/D

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2022-12-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/ClangScanDeps/P1689.cppm:155 +// CHECK-MAKE: [[PREFIX]]/impl_part.o: +// CHECK-MAKE: [[PREFIX]]/impl_part.cppm ben.boeckel wrote: > ben.boeckel wrote: > > ChuanqiXu wrote: > > > ben.boeckel wrote: > > >

[PATCH] D139406: C++20] [Modules] [Serialization] Deserialize LValuePathSerializationHelper's type properly

2022-12-06 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 rG303f20a2cab4: [C++20] [Modules] [Serialization] Deserialize (authored by ChuanqiXu). Herald added a project: clang. Herald added a subscriber: cfe-co

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 481503. ChuanqiXu marked 2 inline comments as done. ChuanqiXu retitled this revision from "[Driver] [Modules] Support -fsave-std-c++-module-file (1/2)" to "[Driver] [Modules] Support -fmodule-output (1/2)". ChuanqiXu added a comment. Rename the option into

[PATCH] D137059: [Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

2022-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 481504. ChuanqiXu retitled this revision from "[Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file (2/2)" to "[Driver] [C++20] [Modules] Support -fmodule-output= (2/2)". ChuanqiXu added a comment. Rename the opti

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137058#3983687 , @iains wrote: > thanks all for the patience on this one - and for the collaborative > discussion - I do think the outcome is going to be an easier to remember > option name ;) Yeah. Thanks for your sugges

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 481975. ChuanqiXu marked 3 inline comments as done. ChuanqiXu edited the summary of this revision. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137058/new/ https://reviews.llvm.org/D137058 Files: cl

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added inline comments. Comment at: clang/test/Driver/save-std-c++-module-file.cpp:8-9 +// +// RUN: %clang -std=c++20 %t/Hello.cppm -fmodule-output -o %t/output/Hello.o \ +// RUN: -### 2>&1 | FileCheck %t/Hello.cppm -DPREFIX=

[PATCH] D137059: [Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

2022-12-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 481978. ChuanqiXu added a comment. Update after D137058 updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137059/new/ https://reviews.llvm.org/D137059 Files: clang/include/clang/Driver/Options.td clang/

[PATCH] D139295: [Coroutines] Don't mark the parameter attribute of resume function as noalias

2022-12-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 rG7dccdd76b374: [Coroutines] Don't mark the parameter attribute of resume function as noalias (authored by ChuanqiXu). Herald added a project: clang. H

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 482359. ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. - Reduce the test down to one example, using -o and skipping the extra OUTPUT_PATH details - as the comment required. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1370

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > (I'd probably still reduce the test down to one example, using -o and > skipping the extra OUTPUT_PATH details, only checking the last part of the > path is as specified (or perhaps checking that it matches the .o file?)) Done. > Also, could you consider the questi

[PATCH] D137059: [Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

2022-12-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 482360. ChuanqiXu added a comment. Update as the dependent one changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137059/new/ https://reviews.llvm.org/D137059 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Driver.cpp clan

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2022-12-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. ping @Bigcheese @jansvoboda11 would you take a look at this if it will affect the existing users and the development? Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139168/new/ https://reviews.llvm.org/D139168 _

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 482738. ChuanqiXu edited the summary of this revision. ChuanqiXu added a comment. Address comments: - if `-o` is not provided, emit the module file to the working directory instead of the directory of the input file. CHANGES SINCE LAST ACTION https://r

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5541-5542 + // + // FIXME: Do we need to handle the case that the calculated output is + // conflicting with the specified output file or the input file? + if (!AtTopLevel && isa(JA) &&

[PATCH] D137059: [Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 482739. ChuanqiXu added a comment. Update since the dependent one changed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137059/new/ https://reviews.llvm.org/D137059 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Driver.cpp c

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: ilya-biryukov, rsmith, dblaikie, iains, erichkeane, tahonermann. 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:

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2161-2198 + /// FIXME: The `DeclContext::noload_lookup()` wouldn't load local lexical + /// lookups since unnamed declarations are skipped. We can find this in + /// `DeclContext::buildLooku

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 483074. ChuanqiXu added a comment. Address comments: - Reuse the logic to compute object file for module file when `-o` is not specified. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137058/new/ https://reviews.llvm.org/D137058 Files: clang/

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5541-5545 +if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o)) + TempPath = FinalOutput->getValue(); +else + TempPath = BaseInput; + dblaikie wrote: > dblaikie w

[PATCH] D137059: [Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 483075. ChuanqiXu added a comment. Update since the dependent one changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137059/new/ https://reviews.llvm.org/D137059 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Driver.cpp c

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2022-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 483083. ChuanqiXu added a comment. Rebase onto main. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139168/new/ https://reviews.llvm.org/D139168 Files: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h clang/lib/Tooling/D

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D140002#4000113 , @vsapsai wrote: > This is my first and pretty shallow review pass. Need to read the standard > more thoroughly to be more useful. Others are welcome to chime in (and as > I'll be on vacation are encouraged

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu planned changes to this revision. ChuanqiXu added a comment. In D140002#4000252 , @vsapsai wrote: > In D140002#4000233 , @ChuanqiXu > wrote: > >>> Test case MergeLambdas3.cppm is unstable. Sometimes it

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 483443. ChuanqiXu added a comment. - when `-fmodule-output` and `-o` are both specified, generate the module file into the directory of the output file and name the module file with the name of the input file with module file's suffixes. (Previously, the n

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5541-5545 +if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o)) + TempPath = FinalOutput->getValue(); +else + TempPath = BaseInput; + dblaikie wrote: > ChuanqiXu

[PATCH] D137059: [Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

2022-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 483449. ChuanqiXu added a comment. Update since the dependent one changed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137059/new/ https://reviews.llvm.org/D137059 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Driver.cpp c

[PATCH] D112903: [C++20] [Module] Fix bug47116 and implement [module.interface]/p6

2022-01-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @aaron.ballman @urnathan gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112903/new/ https://reviews.llvm.org/D112903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

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

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

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

2022-01-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @Quuxplusone @aaron.ballman gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115867/new/ https://reviews.llvm.org/D115867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2022-01-19 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] D112903: [C++20] [Module] Fix bug47116 and implement [module.interface]/p6

2022-01-23 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 rG3a3af2bbc97e: [C++20] [Module] fix bug 47716 and implement [module.interface]/p6 (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHA

[PATCH] D118018: [RFC] [C+++20] [Modules] Mangling lambda in modules

2022-01-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: urnathan, aaron.ballman, dblaikie, rsmith, erichkeane, efriedma, gbenyei. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. This tries to solve https://github.com/llvm/

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

2022-01-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, urnathan, aaron.ballman, erichkeane. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. See https://github.com/cplusplus/draft/pull/5204 for a detailed background

[PATCH] D118018: [RFC] [C+++20] [Modules] Mangling lambda in modules

2022-01-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D118018#3265810 , @urnathan wrote: > I don't think this is wanted. there are two cases: > a) lambda is attached to some ODR-visible entitity. Something like (in > module-purview at namespace-scope) '[maybe-export] auto va

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:650-652 +if (S.getLangOpts().CPlusPlus2b) { + if (BlockStart.isInvalid()) +diagExportedUnnamedDecl(S, *UDK, D, BlockStart); Should we add a cite to P1766R1 here? ===

[PATCH] D118120: [C++20] [Modules] Only check decls under namespace scope in CheckRedeclarationExported

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, erichkeane, tbaeder. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. Since only the decls inhabit in a namespace scope could be export

[PATCH] D118120: [C++20] [Modules] Only check decls under namespace scope in CheckRedeclarationExported

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:1643-1648 + if (!New->getLexicalDeclContext() + ->getNonTransparentContext() + ->isFileContext() || + !Old->getLexicalDeclContext() + ->getNonTransparentContext() +

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:650-652 +if (S.getLangOpts().CPlusPlus2b) { + if (BlockStart.isInvalid()) +diagExportedUnnamedDecl(S, *UDK, D, BlockStart); tbaeder wrote: > ChuanqiXu wrote: > > Should we

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Oh, it looks like we couldn't go on since the part of PR1766R1 is not adopted: https://github.com/cplusplus/draft/issues/5237 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117295/new/ https://reviews.llvm.org/D117295 _

[PATCH] D118120: [C++20] [Modules] Only check decls under namespace scope in CheckRedeclarationExported

2022-01-25 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 rG5c1f7b296ac0: [C++20] [Modules] Only check decls under namespace scope in… (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES S

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

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 403121. ChuanqiXu added a comment. Address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115867/new/ https://reviews.llvm.org/D115867 Files: clang/include/clang/Basic/AttrDocs.td clang/include/clang/Basic/DiagnosticGroups.td clang/

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

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. In D115867#3270137 , @Quuxplusone wrote: > LGTM now, modulo my suggested edits (and the necessary corresponding edits in > the test case). > I don't think I'm really qualified to acc

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

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 403130. 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/module

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

2022-01-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D115610#3269265 , @urnathan wrote: > Seems good to me, @iains you've been looking at this? According to the discussion in https://github.com/llvm/llvm-project/issues/51682, it looks like Iains plans to implement something

[PATCH] D118223: [NFC] [AST] Move isSame* check in ASTReader to ASTContext

2022-01-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, erichkeane. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. Currently we are trying to implement the semantics of C++ Modules. A big

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

2022-01-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu planned changes to this revision. ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:2852 -if (RedundantDefaultArg) { +if (RedundantDefaultArg && !IsOldParamFromModule) { // C++ [temp.param]p12: urnathan wrote:

[PATCH] D118223: [NFC] [AST] Move isSame* check in ASTReader to ASTContext

2022-01-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 rGf85ee6d56a93: [NFC] [AST] Move isSameEntity into ASTContext (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

<    6   7   8   9   10   11   12   13   14   >