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

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

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

2022-08-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 456254. ChuanqiXu added a comment. Add contents for "When precompiling a module in one directory and then moving a header included in the global module fragment from the source file, things will break." CHANGES SINCE LAST ACTION https://reviews.llvm.or

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

2022-08-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3753522 , @aaronmondal wrote: > @ChuanqiXu Thanks a lot for this! > > We are currently implementing this module logic in the Bazel ruleset rules_ll > . > This page helps clarify th

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

2022-08-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. In D132352#3755355 , @nikic wrote: > Okay, this is a bit tricky because we have three different things: > > 1. The noread_thread_id attribute, the lack of which was causing issues with

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

2022-08-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129833#3755135 , @nikic wrote: > In D129833#3727881 , @ChuanqiXu > wrote: > >> And I am working on adding Align properties. But I meet problems since the >> alignment of threadloca

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

2022-08-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D132352#3757415 , @rjmccall wrote: > Stackful coroutine bodies should be straightforward to support on top of the > other work you've been doing, if anyone's actually interested in pursuing > them. As far as the optimizer

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

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 456844. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/StandardCPlusPlusModules.rst clang/docs/index.rst Index: clang/docs/index.rst =

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

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3758898 , @aaronmondal wrote: > I just noticed that there probably needs to be one change. The doc sometimes > describes `-fprebuilt-module-interface`, which is not a valid option. I think > the occurrences were me

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

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @bbrown105 I am going to land this today. it looks like you're not objecting it and we don't have the time to wait for your formal approval... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388

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

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. I'm going to land this. Thanks for everyone who reviewed this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 ___ cfe-commits mailing lis

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

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGb1d5af81249d: [docs] Add "Standard C++ Modules" (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. There is another example we shouldn't make this specific for std::source_location::current(): https://github.com/llvm/llvm-project/issues/57459. I guess we can solve the issue too if we evaluate default argument at the caller position. Repository: rG LLVM Github M

[PATCH] D133085: [clang] trim trailing space in format tests. NFC

2022-08-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added subscribers: aaron.ballman, ChuanqiXu. ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. Do you have commit access? If you have, I remember LLVM encourages such fixes landed directly without review. (+ @aaron.ballman to m

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129488#3760982 , @ilya-biryukov wrote: > @aaron.ballman, that's my reading of the standard as well. Do you think we > should proceed with the current approach or is there another direction worth > pursuing to make source_

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2022-09-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:2819-2823 + // For two canonically equal types, return a type which has + // the common sugar between them. If Unqualified is true, + // both types need only be the same unqualified type. + // T

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-09-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1369 } + QualType getDecayedType(QualType T, QualType Decayed) const; Maybe we need a comment for this. The signature looks not straight forward and I can't relate this to th

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. The summary looks good and I don't make a review in depth due to it is indeed large... (I'll see if I can take a deeper review) Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:890-893 + struct { +bool DoIt; +FunctionDecl *Existing = nu

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-09-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1369 } + QualType getDecayedType(QualType T, QualType Decayed) const; mizvekov wrote: > ChuanqiXu wrote: > > Maybe we need a comment for this. The signature looks not straight

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + mizvekov wrote: > ChuanqiXu

[PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes

2022-09-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1369 } + QualType getDecayedType(QualType T, QualType Decayed) const; mizvekov wrote: > ChuanqiXu wrote: > > mizvekov wrote: > > > ChuanqiXu wrote: > > > > Maybe we need a com

[PATCH] D133160: [cmake] Append CLANG_LIBDIR_SUFFIX to scan-build-py installation destination.

2022-09-02 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1334e129a39c: [cmake] Append CLANG_LIBDIR_SUFFIX to scan-build-py installation destination (authored by sinan, committed by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: erichkeane, ychen, rjmccall. ChuanqiXu added projects: clang, clang-language-wg. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. This implements the option2 of htt

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 458116. ChuanqiXu added a comment. Remove invisible character... there are always invisible characters in the paper.. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133341/new/ https://reviews.llvm.org/D133341 Files: clang/docs/ClangCommandLine

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 458353. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133341/new/ https://reviews.llvm.org/D133341 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/include/clang/

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:688 +auto &Context = getContext(); +auto SizeTy = Context.getSizeType(); +auto T = Builder.getIntNTy(Context.getTypeSize(SizeTy)); --

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + ChuanqiXu wrote: > mizvekov

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + ChuanqiXu wrote: > ChuanqiXu

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + mizvekov wrote: > ChuanqiXu

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + mizvekov wrote: > ChuanqiXu

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-09-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + mizvekov wrote: > ChuanqiXu

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. @ychen @rjmccall ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133341/new/ https://reviews.llvm.org/D133341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

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

2022-09-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @nhaehnle @jyknight @nikic @efriedma @fhahn ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132352/new/ https://reviews.llvm.org/D132352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 459997. ChuanqiXu marked 5 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133341/new/ https://reviews.llvm.org/D133341 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. In D133341#3788283 , @ychen wrote: > It surprises me that Option 2 does not change > https://eel.is/c++draft/dcl.fct.def.coroutine#10. For consistency, I think it > should. And accor

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 460315. ChuanqiXu marked 6 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133341/new/ https://reviews.llvm.org/D133341 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D133341: [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - implement the option2 of P2014R0

2022-09-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/test/SemaCXX/coroutine-alloc-4.cpp:49 +void return_value(int) {} +void *operator new(std::size_t, std::align_val_t) noexcept; +void *operator new(std::size_t) noexcept;

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-10-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > We need to mention this in the docs and the ReleaseNotes since we add a new > flag. > To make this self contained, we need to add a check in the frontend and emit > errors if the compiler find the throwing exception's destructor may throw. > This is not required

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Oh, I am not saying the legacy and old comment. I mean you need to touch ReleaseNotes.rst and UserManual.rst since we add a new flag. Also we need either add a TODO/FIXME saying we need to emit an error in Sema if we find the the dtor of the exception we're throwing m

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/UsersManual.rst:2145-2147 + ``catch (...) { ... }``. This option tells Clang that an exception object's + destructor does not throw, even if the destructor is annotated as + ``noexcept(false)``. I thin

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108905#4655907 , @MaskRay wrote: > In D108905#4655694 , @ChuanqiXu > wrote: > >> Oh, I am not saying the legacy and old comment. I mean you need to touch >> ReleaseNotes.rst and Us

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM. Thanks. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1110 +!FT->isNothrow()) + Diag(ThrowLoc, diag::err_throw_object_throwing_dtor) << Ty << 1 << 1; + } It looks like err

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

2022-06-26 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. From the discussion, it looks like the 'export' part is not necessary here and we don't need to care about linkage in this revision. In D128328#3609827 , @vsapsai wrote: > Sorry for changing my mind. I've thought about the err

[PATCH] D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC.

2022-06-27 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. I found the codes about ODR Check was repeated too. It should be good to do such refactoring. --- Is it possible to combine the several `DiagNote` into `DiagError`? So that the c

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

2022-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 440847. ChuanqiXu marked 15 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 Files: clang/include/clang/AST/DeclBase.h clang/inclu

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

2022-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D113545#3616814 , @rsmith wrote: > A few comments, but they're all minor things or FIXMEs. I'm happy for this to > land once they're addressed. Thanks for reviewing! Comment at: clang/lib/Sema/SemaLookup

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

2022-06-28 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 rG9c04851cf580: [C++20] [Module] Support reachable definition initially/partially (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHAN

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

2022-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @jyknight ping! Or someone else is willing to review this one? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125291/new/ https://reviews.llvm.org/D125291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

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

2022-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/DeclBase.h:624 bool isModulePrivate() const { return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate; } According to the opinion from @rsmith, the discarded declaration

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

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

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D126907#3615807 , @erichkeane wrote: > All tests pass now, I was able to get the template-template checks working > correctly, and it passes all the tests I have available. @ChuanqiXu if you > could review/run what tests

[PATCH] D127187: [C++20] [Modules] Implement AllAdditionalTUReachable

2022-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 440872. ChuanqiXu added a reviewer: MaskRay. ChuanqiXu added a comment. Herald added a subscriber: StephenFan. Rebasing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127187/new/ https://reviews.llvm.org/D127187 Files: clang/include/clang/Basic

[PATCH] D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC.

2022-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D128487#3617422 , @vsapsai wrote: > Thanks for the review! > > In D128487#3614251 , @ChuanqiXu > wrote: > >> Is it possible to combine the several `DiagNote` into `DiagError`? So tha

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-06-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @iains may I ask what's the issue to not land this? It looks like you're waiting for the behavior to be consistency with GCC? Since this patch could fix https://github.com/llvm/llvm-project/issues/51873, which breaks the users to compile a hello world example. Repos

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-06-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. In D126907#3619270 , @erichkeane wrote: > All but the 1 comment from @ChuanqiXu fixed, not sure what to do about the > 'info'. LGTM. But the '

[PATCH] D128488: [ODRHash diagnostics] Split `err_module_odr_violation_mismatch_decl_diff` into per-entity diagnostics. NFC.

2022-06-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM if the changes is specific to C++. Otherwise we need to rename for that enumerate. Comment at: clang/lib/Serialization/ASTReader.cpp:9642 + // note_module_odr_vi

[PATCH] D128489: [ODRHash diagnostics] Move common code for calculating diag locations in `DiagnoseODRMismatch` into a lambda. NFC.

2022-06-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM with comments. Comment at: clang/lib/Serialization/ASTReader.cpp:10020 +auto GetMismatchedDeclLoc = [](const NamedDecl *Container, +

[PATCH] D128489: [ODRHash diagnostics] Move common code for calculating diag locations in `DiagnoseODRMismatch` into a lambda. NFC.

2022-06-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:10020 +auto GetMismatchedDeclLoc = [](const NamedDecl *Container, + ODRMismatchDecl DiffType, const Decl *D) { + SourceLocation Loc; vsap

[PATCH] D128921: [Sema] Merge C++20 concept definitions from different modules in same TU

2022-06-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a reviewer: ChuanqiXu. ChuanqiXu added a comment. Thanks for filing that issue. I wanted to add that myself before. It should be better to change `isVisible` and `hasVisibleDefinition` to `isReachable` and `hasReachableDefinition`. The definition of reachability comes from C++20

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-06-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D126189#3617896 , @iains wrote: > In D126189#3617850 , @ChuanqiXu > wrote: > >> @iains may I ask what's the issue to not land this? It looks like you're >> waiting for the behavior

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

2022-06-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a reviewer: ilya-biryukov. ChuanqiXu added a subscriber: ilya-biryukov. ChuanqiXu added a comment. Add @ilya-biryukov since he did similar things in https://reviews.llvm.org/D128921 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118034/new/ https://reviews.llvm.org/D1180

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

2022-07-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: erichkeane, iains, vsapsai, v.g.vassilev, dblaikie, rsmith, jansvoboda11, aaron.ballman. ChuanqiXu added projects: clang, clang-modules. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a subscriber:

[PATCH] D129045: [C++20][Modules] Update handling of implicit inlines [P1779R3]

2022-07-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/AST/TextNodeDumper.cpp:1723-1725 + if (!D->isInlineSpecified() && D->isInlined()) { +OS << " implicit-inline"; + } Is this necessary to this revision? Comment at: clang/lib/Sema/SemaD

[PATCH] D128981: [C++20][Modules] Implement include translation.

2022-07-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a subscriber: rsmith. ChuanqiXu added inline comments. Comment at: clang/include/clang/Lex/Preprocessor.h:434 +/// Saw a 'module' identifier. +void handleModule(bool ATLTS) { + // This was the first module identifier and not preceded by any token

[PATCH] D129045: [C++20][Modules] Update handling of implicit inlines [P1779R3]

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. It looks like the tests lack the cast that the methods are attached to the global module fragment. Comment at: clang/lib/Sema/SemaDecl.cpp:9363-9365 +Module *M = NewFD->getOwningModule(); +if (!M || M->isGlobalModule()) + New

[PATCH] D128981: [C++20][Modules] Implement include translation.

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Lex/Preprocessor.h:434 +/// Saw a 'module' identifier. +void handleModule(bool ATLTS) { + // This was the first module identifier and not preceded by any token iains wrote: > ChuanqiXu

[PATCH] D129045: [C++20][Modules] Update handling of implicit inlines [P1779R3]

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129045#3627878 , @iains wrote: > In D129045#3627856 , @ChuanqiXu > wrote: > >> It looks like the tests lack the cast that the methods are attached to the >> global module fragment.

[PATCH] D129068: [AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, vsapsai, ilya-biryukov. 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. The current impleme

[PATCH] D129068: [AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442055. ChuanqiXu added a comment. Remove unnecessary changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129068/new/ https://reviews.llvm.org/D129068 Files: clang/lib/AST/ASTContext.cpp clang/test/Modules/concept.cppm Index: clang/test/

[PATCH] D128981: [C++20][Modules] Implement include translation.

2022-07-04 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. Then LGTM if all the comments addressed. Comment at: clang/lib/Lex/PPDirectives.cpp:2226-2227 + + // FIXME: We do not have a good way to disambiguate C++ clang modules

[PATCH] D129045: [C++20][Modules] Update handling of implicit inlines [P1779R3]

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

[PATCH] D129068: [AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442165. ChuanqiXu added a comment. Add comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129068/new/ https://reviews.llvm.org/D129068 Files: clang/lib/AST/ASTContext.cpp clang/test/Modules/concept.cppm Index: clang/test/Modules/concep

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

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. BTW, after I applied the patch, the compiler crashes at https://github.com/ChuanqiXu9/stdmodules. I would try to add more tests about C++20 Modules. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126694/new/ https://revi

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

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: ilya-biryukov, erichkeane, vsapsai, rsmith. 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. Closing

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

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442179. ChuanqiXu added a comment. Undo the format test. It breaks the testing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129104/new/ https://reviews.llvm.org/D129104 Files: clang/lib/AST/ASTContext.cpp clang/test/Modules/concept_differ.c

[PATCH] D129068: [AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442181. ChuanqiXu added a comment. Add tests for nested template parameters. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129068/new/ https://reviews.llvm.org/D129068 Files: clang/lib/AST/ASTContext.cpp clang/test/Modules/concept.cppm Inde

[PATCH] D129068: [AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129068#3629135 , @vsapsai wrote: > I don't know enough to say if it is a good approach or not, I'll need to > check what we can achieve by modifying `Profile` in > `ArgLoc.getArgument().Profile`. I tried but I don't find

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

2022-07-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Ping @jyknight Or anyone else will review this one? I want us to fix the thread problems in clang15, which would be created on July 26th. @rjmccall @nhaehnle @danilaml @efriedma CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125291/new/ https://reviews.llvm.

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

2022-07-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D126694#3629251 , @iains wrote: > In D126694#3629094 , @ChuanqiXu > wrote: > >> BTW, after I applied the patch, the compiler crashes at >> https://github.com/ChuanqiXu9/stdmodules.

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

2022-07-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: iains, aaron.ballman, erichkeane. ChuanqiXu added a project: 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. Since clang15

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

2022-07-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Given @rsmith and @iains is busy and this revision is relatively small, innocent and looks good to me, I plan to land this in Friday in case there is no further comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118034/new/ https://reviews.llvm.org/D118

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

2022-07-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442425. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129104/new/ https://reviews.llvm.org/D129104 Files: clang/lib/AST/ASTContext.cpp clang/test/Modules/concept_differ.cpp clang/test/Modules/con

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

2022-07-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:6532 + const Expr *XCE = ConceptX->getConstraintExpr(); + const Expr *YCE = ConceptY->getConstraintExpr(); + assert(XCE && YCE && "ConceptDecl wihtout constraint expression?"); --

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

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a reviewer: nikic. ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. In D125291#3629276 , @nikic wrote: > FWIW the bitcode patch has landed, so implementing the variant using a token > type should be possible now. I'm

[PATCH] D129174: [C++20][Modules] Invalidate internal-linkage functions in overload sets [P1815R2 part 1]

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Sema/Overload.h:800 +/// This candidate was not viable because it has internal linkage and is +/// from a different module than the use. +ovl_fail_module_mismatched,

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

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442487. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129138/new/ https://reviews.llvm.org/D129138 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst

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

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D129138#3631912 , @iains wrote: > Perhaps we could be a little more bold about the completeness of the > implementation (at least, w.r.t the base paper `P1103`) - we pass the > relevant test cases. I added the wording like

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

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442761. ChuanqiXu added a comment. Update cxx_status.html CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129138/new/ https://reviews.llvm.org/D129138 Files: clang/docs/ReleaseNotes.rst clang/www/cxx_status.html Index: clang/www/cxx_status.ht

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

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added a comment. In D129138#3632128 , @iains wrote: > I would not expect to add all this information to the release notes, or any > of the phab links - just single lines to say that paper numbers are

[PATCH] D129174: [C++20][Modules] Invalidate internal-linkage functions in overload sets [P1815R2 part 1]

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:6406 +if (Function->getFormalLinkage() <= Linkage::InternalLinkage && +getLangOpts().CPlusPlus20 && MF != getCurrentModule()) { + Candidate.Viable = false; iains wrote:

[PATCH] D128921: [Sema] Merge C++20 concept definitions from different modules in same TU

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:8679 + Previous.isSingleResult() ? Previous.getAsSingle() : nullptr; + if (PrevDef && !hasVisibleDefinition(PrevDef) && + Context.isSameEntity(NewDecl, PrevDef)) { rsmith wro

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

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442791. ChuanqiXu added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128974/new/ https://reviews.llvm.org/D128974 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/DeclTemplate.h clang/lib/AST/ASTContext

[PATCH] D129068: [AST] Profiling on constraint expression instead of arguments for TypeConstraint in ASTContext::isSameTemplateParameter

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442792. ChuanqiXu added a comment. Minor changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129068/new/ https://reviews.llvm.org/D129068 Files: clang/lib/AST/ASTContext.cpp clang/test/Modules/concept.cppm Index: clang/test/Modules/conce

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

2022-07-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 442795. ChuanqiXu added a comment. Update tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128974/new/ https://reviews.llvm.org/D128974 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/DeclTemplate.h clang/lib/AST/AST

[PATCH] D129279: [NFC] [Coroutines] Add regression test for heap allocation elision optimization

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

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

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

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

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D126694#3635207 , @iains wrote: > @rsmith, @ChuanqiXu apologies for the multiple revisions, this has turned out > to be much more involved than I imagined from the standard's text. > > In D126694#3629254

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

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 443123. ChuanqiXu added a comment. Minor changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118034/new/ https://reviews.llvm.org/D118034 Files: clang/test/Modules/Inputs/redundant-template-default-arg/foo.cppm clang/test/Modules/Inputs/re

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

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 443124. ChuanqiXu added a comment. Minor changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118034/new/ https://reviews.llvm.org/D118034 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Sema/Sema.h clang/lib/S

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

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu closed this revision. ChuanqiXu added a comment. Committed in https://reviews.llvm.org/rG354a597b9f3aad2a6a37518d47351adb99688cd2 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118034/new/ https://reviews.llvm.org/D118034 ___ cfe-com

[PATCH] D127187: [C++20] [Modules] Implement AllAdditionalTUReachable

2022-07-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. The direction is approved in https://reviews.llvm.org/D113545. @MaskRay might you help to review the style? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127187/new/ https://reviews.llvm.org/D127187 ___ cfe-commits

  1   2   3   4   5   6   7   8   9   10   >