[clang] 230d6f9 - [Coroutines] Remove lifetime intrinsics for spliied allocas in coroutine frames

2022-08-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-05T14:50:43+08:00 New Revision: 230d6f93aaabae985e9fafd071bb3737533c6083 URL: https://github.com/llvm/llvm-project/commit/230d6f93aaabae985e9fafd071bb3737533c6083 DIFF: https://github.com/llvm/llvm-project/commit/230d6f93aaabae985e9fafd071bb3737533c6083.diff LO

[clang] 809b416 - [NFC] Requires x86-registered-target for test/pr56919.cpp

2022-08-05 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-05T16:46:38+08:00 New Revision: 809b4166413f157ce8e45ba0f80438701bf2e133 URL: https://github.com/llvm/llvm-project/commit/809b4166413f157ce8e45ba0f80438701bf2e133 DIFF: https://github.com/llvm/llvm-project/commit/809b4166413f157ce8e45ba0f80438701bf2e133.diff LO

[clang] 8a1727b - [Coroutines] Run coroutine passes by default

2021-07-14 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2021-07-15T14:33:40+08:00 New Revision: 8a1727ba51d262365b0d9fe10fef7e50da7022cd URL: https://github.com/llvm/llvm-project/commit/8a1727ba51d262365b0d9fe10fef7e50da7022cd DIFF: https://github.com/llvm/llvm-project/commit/8a1727ba51d262365b0d9fe10fef7e50da7022cd.diff LO

[clang] 845f0bb - Revert "[clang][ABI] New C++20 module mangling scheme"

2022-03-08 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-03-09T10:15:15+08:00 New Revision: 845f0bb5fac7479b27e5327c8787ac111e9ad610 URL: https://github.com/llvm/llvm-project/commit/845f0bb5fac7479b27e5327c8787ac111e9ad610 DIFF: https://github.com/llvm/llvm-project/commit/845f0bb5fac7479b27e5327c8787ac111e9ad610.diff LO

[clang] ae4eb93 - [NFC] [C++20] [Modules] Add test to show private module fragment is not allowed in partition unit

2022-03-09 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-03-09T19:05:54+08:00 New Revision: ae4eb938c00785540a8c395c9d166cff7516f280 URL: https://github.com/llvm/llvm-project/commit/ae4eb938c00785540a8c395c9d166cff7516f280 DIFF: https://github.com/llvm/llvm-project/commit/ae4eb938c00785540a8c395c9d166cff7516f280.diff LO

[clang] a603f56 - [clang] CWG 2354: prohibit alignas for enums

2022-03-16 Thread Chuanqi Xu via cfe-commits
Author: Vlad Serebrennikov Date: 2022-03-16T15:48:18+08:00 New Revision: a603f566dbe04d8a9eb0ada67b585965945f7e6d URL: https://github.com/llvm/llvm-project/commit/a603f566dbe04d8a9eb0ada67b585965945f7e6d DIFF: https://github.com/llvm/llvm-project/commit/a603f566dbe04d8a9eb0ada67b585965945f7e6d.

[clang] 74b56e0 - [NFC] Remove unused variable in CodeGenModules

2022-04-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-04-08T11:52:31+08:00 New Revision: 74b56e02bda09ae735c6aeca583a2078375f2da1 URL: https://github.com/llvm/llvm-project/commit/74b56e02bda09ae735c6aeca583a2078375f2da1 DIFF: https://github.com/llvm/llvm-project/commit/74b56e02bda09ae735c6aeca583a2078375f2da1.diff LO

[clang] 36de2d6 - [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-04-13T10:56:13+08:00 New Revision: 36de2d639eca4cead62a6c6d288a501cee8bb6e7 URL: https://github.com/llvm/llvm-project/commit/36de2d639eca4cead62a6c6d288a501cee8bb6e7 DIFF: https://github.com/llvm/llvm-project/commit/36de2d639eca4cead62a6c6d288a501cee8bb6e7.diff LO

[clang] cd149db - [NFC] Remove unused variable

2022-04-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-04-19T15:19:40+08:00 New Revision: cd149dbf8ed8334e68e0f69d819bac3d400e8ba7 URL: https://github.com/llvm/llvm-project/commit/cd149dbf8ed8334e68e0f69d819bac3d400e8ba7 DIFF: https://github.com/llvm/llvm-project/commit/cd149dbf8ed8334e68e0f69d819bac3d400e8ba7.diff LO

[clang] 483efc9 - [Pipelines] Remove Legacy Passes in Coroutines

2022-04-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-04-21T10:59:11+08:00 New Revision: 483efc9ad04dccd9f2163c84c2b6198ebb7049a6 URL: https://github.com/llvm/llvm-project/commit/483efc9ad04dccd9f2163c84c2b6198ebb7049a6 DIFF: https://github.com/llvm/llvm-project/commit/483efc9ad04dccd9f2163c84c2b6198ebb7049a6.diff LO

[clang] ce2257d - [C++20] [Modules] Judge current module correctly

2022-04-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-04-21T11:09:55+08:00 New Revision: ce2257d69fd02d0c34164ce3de9ab8dbe6991e0c URL: https://github.com/llvm/llvm-project/commit/ce2257d69fd02d0c34164ce3de9ab8dbe6991e0c DIFF: https://github.com/llvm/llvm-project/commit/ce2257d69fd02d0c34164ce3de9ab8dbe6991e0c.diff LO

[clang] e39ba04 - [C++20] [Coroutines] Warning for always_inline coroutine

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

[clang] 3504937 - [C++20] [Modules] Don't create multiple global module fragment

2022-02-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-02-08T11:52:09+08:00 New Revision: 3504937dfb2b7d90b2c3b3c7b28c472d31489007 URL: https://github.com/llvm/llvm-project/commit/3504937dfb2b7d90b2c3b3c7b28c472d31489007 DIFF: https://github.com/llvm/llvm-project/commit/3504937dfb2b7d90b2c3b3c7b28c472d31489007.diff LO

[clang] 8c930ce - [NFC] [Modules] Refactor ODR checking for default template argument in

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

[clang] d796901 - [C++20] [Modules] Check if modulemap exists to avoid crash in implicit used C++ module

2022-02-10 Thread Chuanqi Xu via cfe-commits
Author: ZezhengLi Date: 2022-02-11T11:22:50+08:00 New Revision: d7969012e40a0906512b5bb304fc8b245386bb15 URL: https://github.com/llvm/llvm-project/commit/d7969012e40a0906512b5bb304fc8b245386bb15 DIFF: https://github.com/llvm/llvm-project/commit/d7969012e40a0906512b5bb304fc8b245386bb15.diff LOG

[clang] 25cdf87 - [NFC] Update new warning to test

2022-02-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-02-16T10:51:56+08:00 New Revision: 25cdf87b13eb990eb84d31211280f4b0d5d470b3 URL: https://github.com/llvm/llvm-project/commit/25cdf87b13eb990eb84d31211280f4b0d5d470b3 DIFF: https://github.com/llvm/llvm-project/commit/25cdf87b13eb990eb84d31211280f4b0d5d470b3.diff LO

[clang] d30ca5e - [C++20] [Coroutines] Implement return value optimization for get_return_object

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

[clang] 4b95a5a - [Modules] Add ODR Check for concepts

2022-07-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-12T23:45:53+08:00 New Revision: 4b95a5a772530f78326941f26e5cb2c33212460f URL: https://github.com/llvm/llvm-project/commit/4b95a5a772530f78326941f26e5cb2c33212460f DIFF: https://github.com/llvm/llvm-project/commit/4b95a5a772530f78326941f26e5cb2c33212460f.diff LO

[clang] f6b0ae1 - [AST] Accept identical TypeConstraint referring to other template

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

[clang] 5791bcf - [AST] [Modules] Handle full cases of DefaultArgStorage::setInherited

2022-07-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-13T00:13:56+08:00 New Revision: 5791bcf9db0a3ec8bbce586dd99fce71fd773134 URL: https://github.com/llvm/llvm-project/commit/5791bcf9db0a3ec8bbce586dd99fce71fd773134 DIFF: https://github.com/llvm/llvm-project/commit/5791bcf9db0a3ec8bbce586dd99fce71fd773134.diff LO

[clang] 2f1555f - [C++20] [Modules] Handle reachability for enum class

2022-07-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-15T15:57:04+08:00 New Revision: 2f1555fb11d74376347ee94eb3af258e047f68ce URL: https://github.com/llvm/llvm-project/commit/2f1555fb11d74376347ee94eb3af258e047f68ce DIFF: https://github.com/llvm/llvm-project/commit/2f1555fb11d74376347ee94eb3af258e047f68ce.diff LO

[clang] 4983fdf - [C++20] [Modules] Handle reachability for deduction guide

2022-07-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-18T15:46:26+08:00 New Revision: 4983fdfec0443cf388adb87b816b7298a7bdf273 URL: https://github.com/llvm/llvm-project/commit/4983fdfec0443cf388adb87b816b7298a7bdf273 DIFF: https://github.com/llvm/llvm-project/commit/4983fdfec0443cf388adb87b816b7298a7bdf273.diff LO

[clang] ea623af - [C++20] [Modules] Avoid inifinite loop when iterating default args

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

[clang] 6d9b847 - [C++20] [Modules] Handle reachability for partial specialization

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

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

2022-07-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-25T17:57:02+08:00 New Revision: d35134485a6cd1b0e25b5dccd330678b9e57919d URL: https://github.com/llvm/llvm-project/commit/d35134485a6cd1b0e25b5dccd330678b9e57919d DIFF: https://github.com/llvm/llvm-project/commit/d35134485a6cd1b0e25b5dccd330678b9e57919d.diff LO

[clang] debd9bf - [NFC] follow up code cleanup after D123837

2022-05-09 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-05-10T10:01:06+08:00 New Revision: debd9bf3f0198984cb4ae66c16758e0c8eeb2e9e URL: https://github.com/llvm/llvm-project/commit/debd9bf3f0198984cb4ae66c16758e0c8eeb2e9e DIFF: https://github.com/llvm/llvm-project/commit/debd9bf3f0198984cb4ae66c16758e0c8eeb2e9e.diff LO

[clang] 3bef90d - [Diagnostic] Warn if the size argument of memset is character literal

2022-05-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-05-16T10:07:01+08:00 New Revision: 3bef90dff64fc717c5d5e33a4d5fb47a4566d04a URL: https://github.com/llvm/llvm-project/commit/3bef90dff64fc717c5d5e33a4d5fb47a4566d04a DIFF: https://github.com/llvm/llvm-project/commit/3bef90dff64fc717c5d5e33a4d5fb47a4566d04a.diff LO

[clang] 452fac9 - [Frontend] [Coroutines] Emit error when we found incompatible allocation

2022-05-16 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-05-17T10:36:21+08:00 New Revision: 452fac9534c00290e92819202d445810e33d0444 URL: https://github.com/llvm/llvm-project/commit/452fac9534c00290e92819202d445810e33d0444 DIFF: https://github.com/llvm/llvm-project/commit/452fac9534c00290e92819202d445810e33d0444.diff LO

[clang] 1b89a25 - [C++20] [Coroutines] Conform the updates for CWG issue 2585

2022-05-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-05-23T15:49:17+08:00 New Revision: 1b89a25a9b960886e486eb20b755634613c088f8 URL: https://github.com/llvm/llvm-project/commit/1b89a25a9b960886e486eb20b755634613c088f8 DIFF: https://github.com/llvm/llvm-project/commit/1b89a25a9b960886e486eb20b755634613c088f8.diff LO

[clang] 9e9cf3f - Revert "[C++20] [Coroutines] Conform the updates for CWG issue 2585"

2022-05-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-05-23T16:21:42+08:00 New Revision: 9e9cf3fa3d282644dd6802cbdf84f4ca6f932fa0 URL: https://github.com/llvm/llvm-project/commit/9e9cf3fa3d282644dd6802cbdf84f4ca6f932fa0 DIFF: https://github.com/llvm/llvm-project/commit/9e9cf3fa3d282644dd6802cbdf84f4ca6f932fa0.diff LO

[clang] 2582965 - [C++20] [Modules] [Reduced BMI] Generate the function body from implicitly instantiated class and constant variables

2024-03-14 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-03-14T15:07:08+08:00 New Revision: 2582965c160486f9e3b0680f1cebc5ffdef9620c URL: https://github.com/llvm/llvm-project/commit/2582965c160486f9e3b0680f1cebc5ffdef9620c DIFF: https://github.com/llvm/llvm-project/commit/2582965c160486f9e3b0680f1cebc5ffdef9620c.diff LO

[clang] Reland Print library module manifest path again (PR #84881)

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

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'll backport this tomorrow if no revert request shows up. https://github.com/llvm/llvm-project/pull/84881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > The file we're looking for is `modules.json`; Renaming it > `libc++.modules.json` like `.so` / `.a` file might be a better idea which > could avoid name clashes when installed in `/usr/lib`. BTW, how do you feel about the paragraph. I thought it as a defect in some level.

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/84881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 0e1e1fc8f0e https://github.com/llvm/llvm-project/pull/84881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > The file we're looking for is `modules.json`; Renaming it > > > `libc++.modules.json` like `.so` / `.a` file might be a better idea which > > > could avoid name clashes when installed in `/usr/lib`. > > > > > > but i didn't rename it, it was with the libc++ prefix dire

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type convertible to `std::coroutine_handle<>` (PR #85684)

2024-03-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I am also ok with changing the patch to reject programs whose await_suspend > doesn't strictly return std::coroutine_handle if upstream prefers. It should be good to do that since it makes the behavior more conforming. And maybe it is better to do this a seperate patch. Esp

[clang] Reland Print library module manifest path again (PR #84881)

2024-03-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > > The file we're looking for is `modules.json`; Renaming it > > > > > `libc++.modules.json` like `.so` / `.a` file might be a better idea > > > > > which could avoid name clashes when installed in `/usr/lib`. > > > > > > > > > > > > but i didn't rename it, it was wit

[clang] [llvm] [Coroutines] Drop dead instructions more aggressively in addMustTailToCoroResumes() (PR #85271)

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

[clang] [llvm] [Coroutines] Drop dead instructions more aggressively in addMustTailToCoroResumes() (PR #85271)

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

[clang] [llvm] [Coroutines] Drop dead instructions more aggressively in addMustTailToCoroResumes() (PR #85271)

2024-03-20 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,65 @@ +// This tests that the symmetric transfer at the final suspend point could happen successfully. ChuanqiXu9 wrote: nit: I feel slightly better to add a link to the github page. https://github.com/llvm/llvm-project/pull/85271 ___

[clang] [clang][frontend] Make DumpModuleInfoAction emit the full macro (PR #85745)

2024-03-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Dumping things from the source location makes me nervous... And giving this is not related to named modules, I'd like to leave this for @Bigcheese https://github.com/llvm/llvm-project/pull/85745 ___ cfe-commit

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type convertible to `std::coroutine_handle<>` (PR #85684)

2024-03-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > In SemaExprCXX.cpp there's EvaluateBinaryTypeTraits that I needed to expose > as suggested by the comment in SemaCoroutine. Is there an alternative way to > do type coercion/equivalence checks? I am confused. If we don't need to check whether a type can be converted to `st

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type convertible to `std::coroutine_handle<>` (PR #85684)

2024-03-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I am confused. If we don't need to check whether a type can be converted to > > std::coroutine_handle, why do we still need EvaluateBinaryTypeTraits or > > similar things. > > I thought your previous comment was to show concern about exposing > `EvaluateBinaryTypeTraits`

[clang] [clang] Improves -print-library-module-manifest-path. (PR #85943)

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

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-22 Thread Chuanqi Xu via cfe-commits
@@ -358,6 +364,30 @@ static Expr *maybeTailCall(Sema &S, QualType RetType, Expr *E, return S.MaybeCreateExprWithCleanups(JustAddress); } +static bool isSpecializationOfCoroutineHandle(Sema &S, QualType Ty, + SourceLocation Loc) {

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-22 Thread Chuanqi Xu via cfe-commits
@@ -339,6 +339,9 @@ Bug Fixes in This Version - Fixes an assertion failure on invalid code when trying to define member functions in lambdas. +- Clang now emits errors for coroutine `await_suspend` functions whose return type is not + one of `void`, `bool`, or `std::corout

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-22 Thread Chuanqi Xu via cfe-commits
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); - CallExpr *AwaitSuspend = cast_or_null( - BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-22 Thread Chuanqi Xu via cfe-commits
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); - CallExpr *AwaitSuspend = cast_or_null( - BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -761,6 +761,13 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { } } + // FIXME: Hack: We're out of bits in FunctionDeclBits, so always + // add this even though it's 0 in the vast majority of cases. We + // might really want to consider storing this in t

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); - CallExpr *AwaitSuspend = cast_or_null( - BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 5fcccd75d0823ff11a4e385565cad65034d0def7 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/inc

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,53 @@ +// It is annoying to handle different slash direction +// in Windows and Linux. So we disable the test on Windows +// here. +// REQUIRES: !system-windows ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/85050 ___

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -3031,6 +3032,11 @@ defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", "Perform ODR checks for decls in the global module fragment.">>, Group; +def gen_reduced_bmi : Flag<["-"], "fgen-reduced-bmi">, ChuanqiXu9 wrote: Done by

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @iains @dwblaikie Understood. And I thought the major problem is that there are a lot flags from clang modules. And it is indeed confusing. But given we have to introduce new flags in this case, probably we can only try to make it more clear by better documents. https://gith

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Using `-fgen-reduced-bmi` currently fails for me with a case that looks like > this: > > ```c++ > // a.hpp > template > void ignore(T const &) noexcept {} > > inline void resultCheck(char const *message) { > ignore(message); > } > > // b.cppm > modul

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Do I miss something? The performance and file size is similar with and > without `-fgen-reduced-bmi`. To reproduce clone > https://github.com/koplas/clang-modules-test and run `build.sh` and > `build_thin_bmi.sh`. Currently, the Reduced BMI will only remove function bodies

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

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

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

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

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-26 Thread Chuanqi Xu via cfe-commits
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); - CallExpr *AwaitSuspend = cast_or_null( - BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

2024-03-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > @iains @dwblaikie Understood. And I thought the major problem is that > > > > there are a lot flags from clang modules. And it is indeed confusing. > > > > But given we have to introduce new flags in this case, probably we can > > > > only try to make it more clear by

[clang] [llvm] [Modules] No transitive source location change (PR #86912)

2024-03-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/86912 None >From 9046d2156cb8641cccf76c643b6f88994105f452 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH] [Modules] No transitive source location change --- clang/

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From 8d4e349710f4ca84a7ad2dd8aa71afa50b730dbb Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH] [Modules] No transitive source location change --- clang/includ

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall any updates? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: BTW, after this patch, with reduced BMI (https://github.com/llvm/llvm-project/pull/85050), we can already do something more interesting than reformating: ``` //--- A.cppm export module A; int funcA0(); int funcA1(); export int funcA() { return funcA0(); } //--- A.v1.cpp

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > By default, `SourceLocation` is 32 bits. One bit is used to distinguish macro > expansions. Looking at libc++'s module map, it contains 999 top-level modules > at this moment. That's 10 bits just to be able to import the (entire) > standard library. That leaves 21 bits, res

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From b46c8fa030deb980c1550edc0ff8510d4e3c4e17 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/inc

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

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

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

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

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Got it. I've renamed the flag as `-fexperimental-modules-reduced-bmi`. I feel the suggestion like let users to use `-Xclang` options look odd.. --- > What do you mean by "symmetric"? I mean, we always want the users to do something explicitly to enable the feature. But this

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From b46c8fa030deb980c1550edc0ff8510d4e3c4e17 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/inc

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

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

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

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From 7399d2417a4b758fa0a98da1f99f3b4ec0eb1046 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH 1/2] [C++20] [Modules] [Itanium ABI] Generate the vtable in the m

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

2024-03-28 Thread Chuanqi Xu via cfe-commits
@@ -41,9 +43,10 @@ Base::~Base() {} // CHECK: @_ZTSW3Mod4Base = constant // CHECK: @_ZTIW3Mod4Base = constant -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr constant -// CHECK-INLINE: @_ZTSW3Mod4Base = linkonce_odr {{.*}}constant -// CHECK-INLINE: @_ZTIW3M

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

2024-03-28 Thread Chuanqi Xu via cfe-commits
@@ -1483,10 +1483,15 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); - // Store (what we currently believe to be) the key function to avoid - // deserializing every method so we can c

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

2024-03-28 Thread Chuanqi Xu via cfe-commits
@@ -60,11 +63,11 @@ int use() { // CHECK-NOT: @_ZTSW3Mod4Base = constant // CHECK-NOT: @_ZTIW3Mod4Base = constant -// CHECK: @_ZTVW3Mod4Base = external unnamed_addr +// CHECK: @_ZTVW3Mod4Base = external -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr cons

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Yes, I explained this in Some low level details section. The size of source > > location won't be affected. Since the size of source location is unsigned > > (practically, it is 32 bits in most platforms). And we use uint64_t as a > > unit in the serializer. So there are

[clang] 235d684 - [C++20] [Modules] [Reduced BMI] Don't record declarations in functions

2024-03-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-03-29T14:21:45+08:00 New Revision: 235d6841601a9dbea293b8e82b0c994f91f42d76 URL: https://github.com/llvm/llvm-project/commit/235d6841601a9dbea293b8e82b0c994f91f42d76 DIFF: https://github.com/llvm/llvm-project/commit/235d6841601a9dbea293b8e82b0c994f91f42d76.diff LO

[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)

2024-03-29 Thread Chuanqi Xu via cfe-commits
@@ -338,6 +409,69 @@ static QualType getCoroutineSuspendExprReturnType(const ASTContext &Ctx, } #endif +llvm::Function * +CodeGenFunction::generateAwaitSuspendWrapper(Twine const &CoroName, + Twine const &SuspendPointName, +

[clang] abfc5ef - [NFC] [Decl] Introduce Decl::isFromExplicitGlobalModule

2024-03-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-03-29T16:21:02+08:00 New Revision: abfc5efb55267689f1852fd7ce3e0a38876aa259 URL: https://github.com/llvm/llvm-project/commit/abfc5efb55267689f1852fd7ce3e0a38876aa259 DIFF: https://github.com/llvm/llvm-project/commit/abfc5efb55267689f1852fd7ce3e0a38876aa259.diff LO

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

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

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

2024-03-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I took another review on this patch and it shows the patch itself is not so correct. The idea of the patch is to skip GMF at first and start to write the module from the module purview directly. Then everything unused in GMF is not used. This seems fine. However, in the modu

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-31 Thread Chuanqi Xu via cfe-commits
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); - CallExpr *AwaitSuspend = cast_or_null( - BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));

[clang] [coroutine] Fix type of an ImplicitParamDecl used in generateAwaitSuspendWrapper (PR #87134)

2024-03-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The change itself looks good to me. It will be better if we can have a reduced test case. https://github.com/llvm/llvm-project/pull/87134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-31 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > If Clang is configured with 64 bit `SourceLocation`, we can't use 96 bits > > for serialization. We can at most use 64 bits for a slot. In that case, we > > can only assume the offset of source location **in its own module** (not > > the global offset!) is not large than

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Got it. I've renamed the flag as `-fexperimental-modules-reduced-bmi`. > > Thanks. > > > I feel the suggestion like let users to use `-Xclang` options look odd.. > > I think the point here is that we want **expert** users to try this out (with > understanding that it mig

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this patch in next week if no objection comes in. https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ef0291e - [NFC] [Serialization] Reordering lexcical and visible TU block after type decl offsets

2024-04-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-01T16:16:03+08:00 New Revision: ef0291e5f4451abbafab0c839bf51a6382f735f3 URL: https://github.com/llvm/llvm-project/commit/ef0291e5f4451abbafab0c839bf51a6382f735f3 DIFF: https://github.com/llvm/llvm-project/commit/ef0291e5f4451abbafab0c839bf51a6382f735f3.diff LO

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

2024-04-01 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I think the support for modules in clangd is pretty important. I posted https://discourse.llvm.org/t/rfc-directions-for-modules-support-in-clangd/78072 and let's see if we can make some progress. https://github.com/llvm/llvm-project/pull/66462

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