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

2021-11-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 386730. ChuanqiXu added a comment. Remove dead codes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112903/new/ https://reviews.llvm.org/D112903 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Basic/DiagnosticSemaKinds.td clan

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I am a little confusing about the problem. The example in the link tells the align of the `promise` instead of the `frame`. The address of `promise` and `frame` is not same. It looks like you're trying to do: + +---+ |

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

2021-11-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 387144. ChuanqiXu added a comment. Fix a mismatch in test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112903/new/ https://reviews.llvm.org/D112903 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D113972: [RFC] [C++20] [Module] Support module partitions initially

2021-11-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, hubert.reinterpretcast, erichkeane. ChuanqiXu added a project: clang. Herald added a subscriber: dexonsmith. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. This file

[PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: Quuxplusone, ldionne. ChuanqiXu added projects: clang, libc++. Herald added a subscriber: lxfind. ChuanqiXu requested review of this revision. Herald added subscribers: libcxx-commits, cfe-commits. Herald added a reviewer: libc++. Since w

[PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 387811. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113977/new/ https://reviews.llvm.org/D113977 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds

[PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 5 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/test/SemaCXX/co_await-range-for-exp-namespace.cpp:54 for -co_await(auto i : arr) {} +co_await(auto i : arr) {} // expected-warning {{Found deprecated std::experimental}}

[PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 387828. ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. Use `-Wno-coroutine` instead of `-Wno-deprectated-experimental-coroutine` to keep CI stable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113977/new/ https://reviews.

[PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. The CI fails. But I guess it would be irrelevant with this diff: /var/lib/buildkite-agent/builds/llvm-project/libcxx/.clang-format:6:17: error: invalid boolean SpacesInAngles: Leave ^ Error reading /var/lib/buildkite-agent/builds/llvm-proje

[PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-17 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 rGaf9f3c6d86b4: [Coroutine] Warn deprecated 'std::experimental::coro

[PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

2021-11-17 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/test/SemaCXX/co_await-range-for-exp-namespace.cpp:54 for -co_await(auto i : arr) {} +co_await(auto i : arr) {} // expected-warning {{Found deprecated std::experimental}}

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-11-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 388125. ChuanqiXu added a comment. Change includes: - Add parent for newly created global module fragment. - Add a test. - Rename test directory. Suddenly I found that the names of the tests in CXX directory are corresponds to the standard one by one. So m

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

2021-11-18 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] D114151: [clang-format] [C++20] [Module] clang-format couldn't recognize partitions

2021-11-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. There could be more tests in case we want support c++20 module more. This shouldn't be a break issue for this patch since this aims to fix the space in partitions only. export template<...>; export struct { ... }; export int func() { // ... } expo

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-11-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 388151. ChuanqiXu added a comment. Format codes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 Files: clang/include/clang/Basic/Module.h clang/include/clang/Lex/ModuleMap.h clang/include/clang/Se

[PATCH] D114151: [clang-format] [C++20] [Module] clang-format couldn't recognize partitions

2021-11-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM with @Quuxplusone's opinions addressed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114151/new/ https://reviews.llvm.org/D114151 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-11-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D110215#3139809 , @aaron.ballman wrote: > In D110215#3139589 , @ChuanqiXu > wrote: > >> Change includes: >> >> - Add parent for newly created global module fragment. >> - Add a test

[PATCH] D114151: [clang-format] [C++20] [Module] clang-format couldn't recognize partitions

2021-11-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3226 +// No space between module :. +if (Left.isOneOf(Keywords.kw_module, tok::kw_export, Keywords.kw_import) && +Right.is(TT_ModulePartitionColon)) owenpan wrote: >

[PATCH] D114769: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

2021-11-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, saar.raz. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. When we use concept in modules, we would meet a curious error. For example:

[PATCH] D114769: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

2021-11-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 390572. ChuanqiXu added a comment. Clean code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114769/new/ https://reviews.llvm.org/D114769 Files: clang/lib/Serialization/ASTReaderDecl.cpp clang/test/Modul

[PATCH] D114769: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

2021-11-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 390668. ChuanqiXu added a comment. Fix tests under Debug mode. I need to remember run debug tests : ( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114769/new/ https://reviews.llvm.org/D114769 Files: clang

[PATCH] D114769: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

2021-11-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 390878. ChuanqiXu added a comment. Format codes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114769/new/ https://reviews.llvm.org/D114769 Files: clang/lib/Serialization/ASTReaderDecl.cpp clang/test/Modules/Inputs/concept/A.cppm clang/test

[PATCH] D114859: [clang-format] Add better support for co-routinues

2021-12-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:22735 + verifyFormat("co_await a; // comment"); + verifyFormat("void test0() { co_await a; }"); +} It may be worth to add following tests: ``` co_await co_await co_await foo(); c

[PATCH] D114859: [clang-format] Add better support for co-routinues

2021-12-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:22748-22749 +TEST_F(FormatTest, CoRoutinereturn) { + verifyFormat("int x = co_return foo();"); + verifyFormat("int x = (co_return foo());"); + verifyFormat("co_return (42);"); M

[PATCH] D114859: [clang-format] Add better support for co-routinues

2021-12-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114859/new/ https://reviews.llvm.org/D114859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D115132: [C++20] [Modules] Namespace Declaration shouldn't have module linkage

2021-12-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, hubert.reinterpretcast, erichkeane. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. According to https://eel.is/c++draft/basic.namesp

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-12-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @aaron.ballman @urnathan @rsmith ping. Might you take a look? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D134267#3864368 , @ruoso wrote: > FWIW, having a differently named argument for output files and input files is > very important for tooling. > > In particular, in the case of remote execution, it makes a huge difference >

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D134267#3864416 , @ruoso wrote: > Currently, no. I think we do need a paper to discuss the requirements of the > remote execution protocol and how they relate to the implementation of C++ > modules. > > The simple summary i

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > once again we are getting off topic for this patch :) Yeah, let's wait for @dblaikie's opinion on the flag name : ) The remained question: To use `-fc++-module-bmi-output=` or `-fc++-module-filename=`, or anything else (maybe `-fc++-module-output=`) CHANGES SINCE

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Yeah, I am a little bit surprising/confusing to see why we're talking about the **behavior** of `-fmodule-file`. I guess the intention of @iains is to throw the option to prove `-fc++-module-file-path` (or `-fc++-module-file-output`) is the better. The point here is a

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I grepped `options.td` and got (incomplete) list for options to take a output name: # -o and its alias -o -object_file_name= --output= /Fa (windows for assembly output filename) /Fe (windows for output executable file name) /Fi (windows for preprocesse

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 469136. ChuanqiXu added a comment. Use `-fc++-module-file-output` to address the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134267/new/ https://reviews.llvm.org/D134267 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @dblaikie I am confusing about your concern. For the test coverage example, on the one hand, it is completely different from the case the coverage report was generated in the runtime instead of the compile time. On the other hand, it also provides a `-fprofile-dir` op

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu abandoned this revision. ChuanqiXu added a comment. In D134267#3876071 , @dblaikie wrote: > I'm getting a bit exhausted with all the words involved here & not sure how > to simplify/clarify this. > > If @ben.boeckel has particular use cases, it

[PATCH] D134269: [docs] Document the one-phase style compilation to c++ standard modules

2022-10-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu planned changes to this revision. ChuanqiXu added a comment. Suspended due to the dependent patches suspended. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134269/new/ https://reviews.llvm.org/D134269 ___ cfe-commits mailing list c

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D136953#3892578 , @aaron.ballman wrote: > I think the standards wording here is a bit unclear as to what's intended and > I had misunderstood the wording around which part of the path needs to be > checked. Specifically: >

[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: dblaikie, ben.boeckel, iains, tschuett. ChuanqiXu added a project: clang-modules. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Pat

[PATCH] D137059: [Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: dblaikie, ben.boeckel, iains, tschuett. ChuanqiXu added a project: clang-modules. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Suc

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D134267#3892629 , @ben.boeckel wrote: > In D134267#3876071 , @dblaikie > wrote: > >> I'm getting a bit exhausted with all the words involved here & not sure how >> to simplify/clar

[PATCH] D136221: [docs] Add the description about mixing use of clang modules and c++ modules

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe12b627a35ee: [docs] Add the description about mixing use of clang modules and c++ (authored by ChuanqiXu). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Git

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. The serialization part looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:282 + StringRef FirstComponentName = Path[0].first->getName(); + if (!getSourceManager().isInSystemHeader(Path[0].second) && + (FirstComponentName == "std" || cor3ntin wrote: > Chua

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:282 + StringRef FirstComponentName = Path[0].first->getName(); + if (!getSourceManager().isInSystemHeader(Path[0].second) && + (FirstComponentName == "std" || aaron.ballman wrote: >

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/Modules/reserved-names-1.cpp:25 + expected-error {{module declaration must occur at the start of the translation unit}} +export module std.foo;// expected-error {{'std' is a reserved name for a modu

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/Modules/reserved-names-1.cpp:25 + expected-error {{module declaration must occur at the start of the translation unit}} +export module std.foo;// expected-error {{'std' is a reserved name for a modu

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:282 + StringRef FirstComponentName = Path[0].first->getName(); + if (!getSourceManager().isInSystemHeader(Path[0].second) && + (FirstComponentName == "std" || erichkeane wrote: > Ch

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM if we add a test for `foo.std`. Comment at: clang/docs/ReleaseNotes.rst:351 + export declaration. Both are diagnosed as an error, but the diagnostic is + suppressed for use of reserved names in a system header.

[PATCH] D137059: [Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file (2/2)

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137059#3896661 , @dblaikie wrote: > Could you link to the email/discourse discussion about supporting this mode > (I think you've linked it in other discussions, be good to have it for > reference here & Probably in the ot

[PATCH] D137059: [Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file (2/2)

2022-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137059#3898463 , @iains wrote: > In D137059#3898239 , @ChuanqiXu > wrote: > >> In D137059#3896661 , @dblaikie >> wrote: >> >>> Could you l

[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)

2022-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137058#3896999 , @dblaikie wrote: > @ben.boeckel maybe this'd be the place to discuss the motivation for this > feature (picking up from your comment here: > https://reviews.llvm.org/D134267#3892629 ) > > admittedly there

[PATCH] D137059: [Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file (2/2)

2022-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > Having a mechanism to specify the place for the file is fine by me ( I was > only commenting on the motivation point for separate pcm and object phases ). > > (I think we should move this discussion somewhere else, again - unless it is > considered a key factor in de

[PATCH] D131651: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

2022-08-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: aaron.ballman, erichkeane, ilya-biryukov, iains. ChuanqiXu added a project: clang. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. Closing https://github.com/llvm/llvm-proj

[PATCH] D131651: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

2022-08-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:6152 +// of `getDeclContext()` once we find the invalid test case. if (FD->getFriendObjectKind() && FD->getDeclContext()->isFileContext()){ DC = FD->getLexical

[PATCH] D131651: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

2022-08-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/DeclBase.h:2020 /// Examples of transparent contexts include: enumerations (except for - /// C++0x scoped enums), and C++ linkage specifications. + /// C++0x scoped enums), C++ linkage specifications and ex

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

2022-08-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 451750. ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. Address comments: - Change `module file` to `BMI`. - Replace `rm -f` with `rm`. - Add a conclusion paragraph to the `How module speed up compilation` section. CHANGES SINCE LAS

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

2022-08-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:665 + # This is not allowed! + $ clang++ iostream.pcm -c -o iostream.o + dblaikie wrote: > could this use a strikethrough, perhaps? (not sure if you can strikethrough > inside a co

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-08-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D126907#3712363 , @erichkeane wrote: > In D126907#3711956 , @ChuanqiXu > wrote: > >> In D126907#3710656 , @erichkeane >> wrote: >> >>> Ok,

[PATCH] D131651: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

2022-08-11 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0bc993edf4ec: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported… (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

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

2022-08-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452095. ChuanqiXu added a comment. Remove `non-inline` terms. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/CPlusPlus20Modules.rst clang/docs/index.rst Index: clang/docs/index.rs

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

2022-08-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:395-396 + +Roughly, this theory is correct. But the problem is that it is too rough. Let's see what actually happens. +For example, the behavior also depends on the optimization level, as we will ill

[PATCH] D129833: Use @llvm.threadlocal.address intrinsic to access TLS

2022-08-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129833#3717291 , @jyknight wrote: > Note that this change caused LLVM to no longer be aware that a TLS variable > cannot be NULL. Thus, code like: > > __thread int x; > int main() { > int* y = &x; > return *y; >

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

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452610. ChuanqiXu marked an inline comment 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-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452612. 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/index.rst Index: clang/docs/index.rst ===

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

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3719794 , @dblaikie wrote: > Actually, when it comes to diagrams - maybe what'd be good is a diagram of > classic compilation and a diagram of modules and header modules > > src1.cpp -+> clang++ src1.cpp --> src1.o

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1415 def int_threadlocal_address : DefaultAttrsIntrinsic<[llvm_anyptr_ty], [LLVMMatchType<0>], - [IntrNoMem, IntrSpeculatable, IntrWillReturn]>; +

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/CodeGenCXX/threadlocal_address.cpp:27 // CHECK-O1-NEXT: entry: -// CHECK-O1-NEXT: %[[I_ADDR:.+]] = {{.*}}call ptr @llvm.threadlocal.address.p0(ptr nonnull @i) +// CHECK-O1-NEXT: %[[I_ADDR:.+]] = {{.*}}call ptr @llvm.t

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-15 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/test/CodeGenCXX/threadlocal_address.cpp:27 // CHECK-O1-NEXT: entry: -// CHECK-O1-NEXT: %[[I_ADDR:.+]] = {{.*}}call ptr @llvm.threadlocal.addre

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

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452875. ChuanqiXu marked an inline comment 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] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: aaron.ballman, erichkeane, ychen, avogelsgesang. ChuanqiXu added a project: clang. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. Closing https://github.com/llvm/llvm-proj

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I am not sure if I don't miss any points. But if it is OK to run libc++/libstdc++, I think it should be good to land this. Comment at: clang/include/clang/Sema/Sema.h:3642 + // template, for the purposes of [temp.friend] p9. + bool ConstraintExpres

[PATCH] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452880. ChuanqiXu added a comment. Add ReleaseNotes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131938/new/ https://reviews.llvm.org/D131938 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td clang/includ

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

2022-08-15 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/include/clang/Sema/Sema.h:2264 + /// be checked at the end of the TU. + llvm::SmallPtrSet PendingInlineFuncDecls; + I'm curious

[PATCH] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452925. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131938/new/ https://reviews.llvm.org/D131938 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td clang/includ

[PATCH] D129833: Use @llvm.threadlocal.address intrinsic to access TLS

2022-08-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129833#3717291 , @jyknight wrote: > Note that this change caused LLVM to no longer be aware that a TLS variable > cannot be NULL. Thus, code like: > > __thread int x; > int main() { > int* y = &x; > return *y; >

[PATCH] D131953: [PowerPC][Coroutines] Add tail-call check with context information for coroutines

2022-08-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 with comment addressed. Thanks! Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:346 + bool supportsTailCallFor(const CallBase *CB) const { retu

[PATCH] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131938#3727954 , @ychen wrote: >> Since the coroutines are going to split into pieces in the middle end so the >> address of labels are ambiguous that time. > > Do we split in the middle or copy the whole computed goto CFG?

[PATCH] D132014: [C++20] [Modules] Replace is ModuleMapModule with isHeaderLikeModules

2022-08-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added a reviewer: iains. ChuanqiXu added a project: clang. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. I find that many places we should use `isHeaderLikeModules` instead of `isModuleM

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

2022-08-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 453207. ChuanqiXu added a comment. Add description to use `-fmodule-header` to generate BMI for header units. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/CPlusPlus20Modules.rst

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

2022-08-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. If no objection (not comments) come in, I want to land this in next Friday (8.25) since I want to backport this to 15.x and 15.x is going to release in September. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 ___

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

2022-08-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 454012. ChuanqiXu marked an inline comment 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-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:457 + +The declarations in a module unit which are not in global module fragment have new linkage names. + JohelEGP wrote: > Thanks for reviewing. BTW, the `request to change` button

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

2022-08-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1262 +if (auto *FDD = FD->getDefinition()) { + DefInPMF = FDD->getOwningModule()->isPrivateModule(); + if (!DefInPMF) iains wrote: > ChuanqiXu wrote: > > nit: > (I adde

[PATCH] D132415: [LLDB] Add data formatter for std::coroutine_handle

2022-08-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a reviewer: dblaikie. ChuanqiXu added a comment. LGTM. But I am not familiar with debugger internals. So I'll leave the formal acceptance for other reviewers. Comment at: lldb/source/Plugins/Language/CPlusPlus/Coroutines.cpp:138 +} \ No newline at end of file

[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

2022-08-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 454683. ChuanqiXu edited the summary of this revision. ChuanqiXu added a comment. Address comments: - Edit LangRef.rst. - Split the add-the-attributes part in later revisions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132352/new/ https://revi

[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

2022-08-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 454696. ChuanqiXu marked 3 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132352/new/ https://reviews.llvm.org/D132352 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode

[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

2022-08-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 454697. ChuanqiXu added a comment. I post the incorrect version the last time. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132352/new/ https://reviews.llvm.org/D132352 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBitCodes.h

[PATCH] D132434: Add noread_thread_id attribute to intrinsics

2022-08-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: nhaehnle, jyknight, nikic, rjmccall, efriedma, fhahn, ychen, jdoerfert. ChuanqiXu added a project: clang. Herald added subscribers: jeroen.dobbelaere, wenlei, okura, kuter, arichardson. Herald added a project: All. ChuanqiXu requested rev

[PATCH] D132451: [docs] Add examples for printing asynchronous stack for coroutines

2022-08-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: avogelsgesang, dblaikie, aprantl, labath, JDevlieghere. ChuanqiXu added a project: debug-info. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits

[PATCH] D132451: [docs] Add examples for printing asynchronous stack for coroutines

2022-08-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 454744. ChuanqiXu edited the summary of this revision. ChuanqiXu added a comment. Fix a typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132451/new/ https://reviews.llvm.org/D132451 Files: clang/docs/DebuggingCoroutines.rst Index: clang/doc

[PATCH] D132451: [docs] Add examples for printing asynchronous stack for coroutines

2022-08-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 454745. ChuanqiXu added a comment. Fix a typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132451/new/ https://reviews.llvm.org/D132451 Files: clang/docs/DebuggingCoroutines.rst Index: clang/docs/DebuggingCoroutines.rst =

[PATCH] D132451: [docs] Add examples for printing asynchronous stack for coroutines

2022-08-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/DebuggingCoroutines.rst:619 + +.. code-block:: text + Here we can't use `.. code-block:: console` since it will meet some parsing problems. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132451/new

[PATCH] D132451: [docs] Add examples for printing asynchronous stack for coroutines

2022-08-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D132451#3742064 , @avogelsgesang wrote: > LGTM, thanks! > > I guess I will update this documentation with LLDB examples, as soon as > https://reviews.llvm.org/D132415 and a couple of follow-up improvements > landed. > As s

[PATCH] D132451: [docs] Add examples for printing asynchronous stack for coroutines

2022-08-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 rG4332b049edf6: [docs] Add examples for printing asynchronous stack for coroutines (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHA

[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

2022-08-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 455209. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132352/new/ https://reviews.llvm.org/D132352 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/include/llvm/IR/Attri

[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

2022-08-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added inline comments. Comment at: llvm/include/llvm/IR/InstrTypes.h:1863 + /// not access or only reads memory. + bool doesNotReadThreadIDNorLivesInPresplitCoroutine() const { +return doesNoReadThreadID() || !getFunctio

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

2022-08-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 455462. ChuanqiXu retitled this revision from "[docs] Add "C++20 Modules"" to "[docs] Add "Standard C++ Modules"". ChuanqiXu edited the summary of this revision. ChuanqiXu added a comment. Replace `C++20 Modules` with `Standard C++ Modules` since @ruoso poi

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

2022-08-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3748769 , @ruoso wrote: > I just noticed that the document was implying that Header Units were separate > from the Standard C++ Modules, but they are an integral part of the language > in the specification of module

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

2022-08-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 455802. ChuanqiXu marked 5 inline comments as done. ChuanqiXu added a comment. Address comments: - Change the file name to `StandardCPlusPlusModules` - Combine header units with modules more tightly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

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

2022-08-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3748769 , @ruoso wrote: > I just noticed that the document was implying that Header Units were separate > from the Standard C++ Modules, but they are an integral part of the language > in the specification of module

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