Page MenuHomePhabricator

lime (Liming Liu)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 18 2022, 1:07 AM (9 w, 6 d)

Recent Activity

Thu, Nov 24

lime updated the diff for D137531: [clang] Add the check of membership in decltype for the issue #58674.

Undo unrelated format changes.

Thu, Nov 24, 4:06 AM · Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D137531: [clang] Add the check of membership in decltype for the issue #58674.

Rebase.

Thu, Nov 24, 4:02 AM · Restricted Project, Restricted Project, Restricted Project

Wed, Nov 23

lime added a comment to D137531: [clang] Add the check of membership in decltype for the issue #58674.

Ping!

Wed, Nov 23, 7:16 PM · Restricted Project, Restricted Project, Restricted Project

Wed, Nov 16

lime updated the diff for D137531: [clang] Add the check of membership in decltype for the issue #58674.
Wed, Nov 16, 4:09 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Nov 15

lime updated the summary of D137531: [clang] Add the check of membership in decltype for the issue #58674.
Tue, Nov 15, 7:09 AM · Restricted Project, Restricted Project, Restricted Project

Sun, Nov 13

lime updated the diff for D137531: [clang] Add the check of membership in decltype for the issue #58674.

Remove an if-statement.

Sun, Nov 13, 1:04 AM · Restricted Project, Restricted Project, Restricted Project

Fri, Nov 11

lime updated the diff for D137531: [clang] Add the check of membership in decltype for the issue #58674.
Fri, Nov 11, 4:55 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Nov 8

lime updated the diff for D137531: [clang] Add the check of membership in decltype for the issue #58674.
Tue, Nov 8, 3:41 AM · Restricted Project, Restricted Project, Restricted Project

Mon, Nov 7

lime added a reviewer for D137531: [clang] Add the check of membership in decltype for the issue #58674: cor3ntin.
Mon, Nov 7, 3:43 AM · Restricted Project, Restricted Project, Restricted Project
lime retitled D137531: [clang] Add the check of membership in decltype for the issue #58674 from [Clang] Fix the GitHub issue #58674 to [clang] Fix the GitHub issue #58674.
Mon, Nov 7, 12:54 AM · Restricted Project, Restricted Project, Restricted Project

Sun, Nov 6

lime set the repository for D137531: [clang] Add the check of membership in decltype for the issue #58674 to rG LLVM Github Monorepo.
Sun, Nov 6, 11:51 PM · Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D137531: [clang] Add the check of membership in decltype for the issue #58674.

Remove unnecessary changes in test cases.

Sun, Nov 6, 11:46 PM · Restricted Project, Restricted Project, Restricted Project
lime added a project to D137531: [clang] Add the check of membership in decltype for the issue #58674: Restricted Project.
Sun, Nov 6, 11:37 PM · Restricted Project, Restricted Project, Restricted Project
lime added a project to D137531: [clang] Add the check of membership in decltype for the issue #58674: Restricted Project.
Sun, Nov 6, 11:34 PM · Restricted Project, Restricted Project, Restricted Project
lime requested review of D137531: [clang] Add the check of membership in decltype for the issue #58674.
Sun, Nov 6, 11:34 PM · Restricted Project, Restricted Project, Restricted Project

Fri, Oct 28

lime resigned from D136468: Test-patch for https://reviews.llvm.org/D134128 alternative.
Fri, Oct 28, 12:08 AM · Restricted Project

Oct 27 2022

lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Liming Liu <gangliugangliu.ml@outlook.com>

Oct 27 2022, 6:19 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Update as suggested. Could you please help me apply this patch? It seems unsuitable to grant a fresh account the accessibility.

Oct 27 2022, 12:56 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 26 2022

lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Update commit message, and remove the "for" in release notes, which should make the phrase correct in grammar.

Oct 26 2022, 7:48 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Update release notes as required.

Oct 26 2022, 6:21 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

The previous update for conflicts lacks a comma, and the comma was added.

Oct 26 2022, 4:40 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Solve the conflicts.

Oct 26 2022, 2:02 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Solve the format issue further.

Oct 26 2022, 1:23 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 25 2022

lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Update for the format check.

Oct 25 2022, 9:45 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Solve the conflicts, and the issue about CMakeLists.txt had been solved by upstream.

Oct 25 2022, 8:13 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Update as required. Also, I need the following modification to complete ninja check-all. Maybe, I should submit another patch.

diff --git a/clang/unittests/Support/CMakeLists.txt b/clang/unittests/Support/CMakeLists.txt
index 956b3a7561..2413088a2b 100644
--- a/clang/unittests/Support/CMakeLists.txt
+++ b/clang/unittests/Support/CMakeLists.txt
@@ -9,4 +9,7 @@ add_clang_unittest(ClangSupportTests
 clang_target_link_libraries(ClangSupportTests
   PRIVATE
   clangFrontend
+  clangAST
+  clangSerialization
+  clangBasic
   )
Oct 25 2022, 7:01 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 23 2022

lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Update for the format check.

Oct 23 2022, 6:08 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I updated the patch based on D136468. I added a change which I think could be a fix to the specialization problem. It is just skipping the addition of the level where the specialization specialized from, as it seems to effect the calculation of the depth but not the depth in the constraint.

Oct 23 2022, 4:20 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 18 2022

lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

which isn't clear to me what you mean

  • In the function Sema::CheckTemplateArgument at line 5725, Params has been substituted in a way all TemplateTypeParmDecls are instantiated with a smaller depth, and so are constraints of them at SemaTemplateInstantiateDecl.cpp:2769, while the requires clause remains the same.
  • Then CheckTemplateArgument calls CheckTemplateTemplateArgument which calls IsAtLeastAsConstrained with the original declaration and the constraint collected from Params. Thus, in IsAtLeastAsConstrained, the depth calculated from the declaration will not reflect the depth in the constraint.
  • It should be fine to not adjust the depths between two constraints passed to IsAtLeastAsConstrained if the requires clause is not parsed, as they are already the same. But it is not the case when the constraint is from a requires clause, as requires clauses are not substituted. However, calculating from declarations will break the original case.

I wouldn't expect the requires clause (nor any other concept related AST node) to be instantiated at all until it is going through 'checking'

The function TemplateDeclInstantiator::SubstTemplateParams instantiates constraints like the one template <template <C T> class>, as I mentioned above. So it is already happened.

Oct 18 2022, 6:33 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 16 2022

lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I think I located the problem. In the line 4014 of the file SemaTemplateInstantiateDecl.cpp, the requires clause is not instantiated as the parameters of the template parameter list, and these parameters have been instantiated with a shallower depth. So that's the reason why the depths are not confirm between the T in template <template <C T> class> and the constraints on the instantiated parameters. I guess adjusting depths should be unnecessary in IsAtLeastAsConstrained, if the requires clause was correctly instantiated, so should changes related to SemaConcept.cpp. I will work on this later.

Oct 16 2022, 7:31 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 12 2022

lime added inline comments to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.
Oct 12 2022, 9:57 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime added inline comments to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.
Oct 12 2022, 8:12 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Unless I'm missing something, I don't think this idea of 'unify constraint depth' is correct. We should be able, from the decl itself, to determine the depths? What is the difference here that I'm not getting?

It is explained by the inline comments in sequence.

Can you explain why this is a MutableArrayRef now? I believe this means it'll now modify the arrays that are passed into it, which we don't necessarily want, right?

In the previous update, I mentioned using ArrayRef is not as efficient as MutableArrayRef. And there was no feedback on my comment for several days, so I changed it as I said. Additionally, I found some code once called IsAtLeastAsConstrained for two constraints, and then call IsAtLeastAsConstrained again with the sequence of the two constraints swapped. So using MutableArrayRef also saves a potential adjustment.
Any way, adjusting depths here might be unique to template template parameters. If so, parsing the require clause in the unit test with depth equal to 0 should be a better solution, and things about CalculateTemplateDepthForConstraints and ArrayRef could remain unchanged.

Oct 12 2022, 8:11 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I updated the patch as I said, while kept the key of NormalizationCache relatively heavy. That means I:

Oct 12 2022, 1:08 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 7 2022

lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

The changes in Sema.h and the changes of CalculateTemplateDepthForConstraints

Oct 7 2022, 6:22 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 6 2022

lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I updated the patch to fix the previous problem about failing to pass unit tests. And, isn't this patch accepted a little quickly? BTW, NormalizationCache becomes heavier than before.

Oct 6 2022, 8:29 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 5 2022

lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Thanks for the advice. I used AdjustConstraintDepth before subsume. The adjusted constraints are assigned to new addresses, but I think MutableArrayRef could be used here.

Oct 5 2022, 9:30 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I provided a solution for the problem I mentioned above, although it may look ugly. Then, I will take a look at friend related stuffs.

Oct 5 2022, 7:58 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Oct 3 2022

lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I'm wondering whether classes like TemplateArgumentLoc could refer to the template head of the TemplateArgument, so the comparison of parameter mappings could be modified, and then the referred variable could be accepted.

Oct 3 2022, 4:48 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sep 30 2022

lime updated the diff for D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I rearranged the error messages. But after I rebased this patch on D126907, the file p3-2a.cpp no longer passed. So I did some investigations there. The problem has not been solved yet.

Sep 30 2022, 8:27 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sep 25 2022

lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Well, Something happened after rebasing this patch on D126907. s41 below was rejected as the constrain generated from template <C> was no longer considered to subsume the constrain generated from template <typename T> requires C in the template template argument, which is not the case in both GCC and MSVC. However, GCC and MSVC also accept the redeclaration for S, which might be ill-formed because of this rule. If this kind of redeclaration happens on X, GCC and MSVC will reject it. Rebasing this patch on D126907 will also not make the both redeclaration valid.

Sep 25 2022, 7:21 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sep 21 2022

lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

I have not looked deep into D126907, but the rule it referred seems related to something as follows:

Sep 21 2022, 6:33 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sep 18 2022

lime added a comment to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.

Thanks for working on this.
I'll be honest though, I still have absolutely no understanding what the use cases or intents of this features are. I think we were waiting for core to clarify and I'm not sure they did.
This does seem to implement the wording though...

Sep 18 2022, 6:05 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime added a project to D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters: Restricted Project.
Sep 18 2022, 2:32 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lime requested review of D134128: [P0857R0 Part B] Resubmit an implemention for constrained template template parameters.
Sep 18 2022, 1:54 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project