Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

jcsxky (Qizhi Hu)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 17 2023, 5:50 PM (11 w, 14 h)

Recent Activity

Tue, Sep 19

jcsxky added a comment to D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt.

ping~ @donat.nagy @steakhal @balazske

Tue, Sep 19, 12:06 AM · Restricted Project, Restricted Project, Restricted Project

Fri, Sep 15

jcsxky updated the diff for D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt.

update according to llvm convention.

Fri, Sep 15, 9:10 AM · Restricted Project, Restricted Project, Restricted Project
jcsxky retitled D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt from [clang][ASTImport] improve AST comparasion on VarDecl & GotoStmt to [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt.
Fri, Sep 15, 9:06 AM · Restricted Project, Restricted Project, Restricted Project
jcsxky retitled D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt from [clang][ASTImport] improve ast comparation to [clang][ASTImport] improve AST comparasion on VarDecl & GotoStmt.
Fri, Sep 15, 3:01 AM · Restricted Project, Restricted Project, Restricted Project

Thu, Sep 14

jcsxky requested review of D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt.
Thu, Sep 14, 7:48 PM · Restricted Project, Restricted Project, Restricted Project

Thu, Sep 7

jcsxky added a comment to D159479: [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation.

Today we learned that truth is different from falsehood...

LGTM, nice catch!

Thu, Sep 7, 6:03 AM · Restricted Project, Restricted Project, Restricted Project
jcsxky added a comment to D159479: [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation.

Make sure the commit message complies with the guidelines.

Thu, Sep 7, 6:02 AM · Restricted Project, Restricted Project, Restricted Project
jcsxky retitled D159479: [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation from [ASTImport]enhance statement comparing to [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation.
Thu, Sep 7, 6:00 AM · Restricted Project, Restricted Project, Restricted Project
jcsxky added reviewers for D159479: [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation: balazske, steakhal, aaron.ballman, NoQ, donat.nagy.
Thu, Sep 7, 4:08 AM · Restricted Project, Restricted Project, Restricted Project
jcsxky requested review of D159479: [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation.
Thu, Sep 7, 3:40 AM · Restricted Project, Restricted Project, Restricted Project

Mon, Sep 4

jcsxky abandoned D159412: [analyzer]FieldRegion in getStaticSize should return size of pointee type.
Mon, Sep 4, 9:52 PM · Restricted Project, Restricted Project, Restricted Project
jcsxky added a comment to D159412: [analyzer]FieldRegion in getStaticSize should return size of pointee type.

Please add a testcase that demonstrates this issue (fails when your change in MemRegion.cpp isn't added) and shows that your commit fixes it.

Mon, Sep 4, 9:50 PM · Restricted Project, Restricted Project, Restricted Project

Sun, Sep 3

jcsxky requested review of D159412: [analyzer]FieldRegion in getStaticSize should return size of pointee type.
Sun, Sep 3, 7:45 PM · Restricted Project, Restricted Project, Restricted Project

Aug 21 2023

jcsxky added inline comments to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 21 2023, 6:46 PM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

add argument comment according to bugprone-argument-comment.

Aug 21 2023, 6:43 PM · Restricted Project, Restricted Project
jcsxky added a comment to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

My concern was related to nested namespaces or nested classes with friend declarations that are equivalent and differ only in the nesting level. It may be possible to construct code where a declaration at an inner (nested) level is found to be equivalent with a similar looking class at an outer level. But I now do not have time to look for an example to test it, and I am not fully familiar with exact rules of friend declarations, so I accept this fix.

Aug 21 2023, 10:33 AM · Restricted Project, Restricted Project

Aug 18 2023

jcsxky added a comment to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

A simple test should be added to StructuralEquivalenceTest.cpp too to check if ignore (and not ignore) depth works.

I think this solution is not always correct, but is still an improvement.

Aug 18 2023, 10:21 PM · Restricted Project, Restricted Project

Aug 15 2023

jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

Fix variable names according to the convention.

Aug 15 2023, 8:55 AM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

Add testcase to illustrate the difference between TemplateTypeParm and NonTypeTemplateParm in detecting by structural equivalence.

Aug 15 2023, 2:10 AM · Restricted Project, Restricted Project
jcsxky added inline comments to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 15 2023, 2:01 AM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

Add more simple testcase to StructuralEquivalenceTest.cpp.

Aug 15 2023, 12:54 AM · Restricted Project, Restricted Project

Aug 14 2023

jcsxky added inline comments to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 14 2023, 11:14 AM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

fixed according to the review and add testcase to StructuralEquivalenceTest.cpp.

Aug 14 2023, 11:05 AM · Restricted Project, Restricted Project

Aug 11 2023

jcsxky retitled D156693: [clang][ASTImporter]Skip check depth of friend template parameter from [clang][ASTImporter]Skip check friend template depth to [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 11 2023, 9:53 AM · Restricted Project, Restricted Project

Aug 8 2023

jcsxky abandoned D155537: [ASTImporter] Fix import failed when anonymous union defined in class.
Aug 8 2023, 6:39 PM · Restricted Project, Restricted Project
jcsxky added a comment to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

This fix can cause problems because the depth comparison is omitted all times. It would be better to omit depth check if the imported template is a friend, and has a ClassTemplateSpecializationDecl as context. Probably even then it is possible to construct cases where the checked template has references to other templates with different "depth" which should not omitted in the check. But I have no idea of a better solution, only to pass a ClassTemplateDecl or ClassTemplateSpecializationDecl to StructuralEquivalenceContext and omit the depth check only at this object.

Aug 8 2023, 5:45 AM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

update diff: add more conditions on when to ignore comparing depth of two template classes to minimize influence to others and fix name of test case to make easy understanding

Aug 8 2023, 5:35 AM · Restricted Project, Restricted Project

Aug 7 2023

jcsxky updated the summary of D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 7 2023, 12:33 AM · Restricted Project, Restricted Project

Aug 5 2023

jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

clean unittest

Aug 5 2023, 11:16 AM · Restricted Project, Restricted Project
jcsxky retitled D156693: [clang][ASTImporter]Skip check depth of friend template parameter from [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl to [clang][ASTImporter]Skip check friend template depth.
Aug 5 2023, 10:43 AM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

update diff: ignore comparing depth in friend class template

Aug 5 2023, 10:42 AM · Restricted Project, Restricted Project
jcsxky added a comment to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

The summary tells nothing about what is the real problem to fix here. In the lit test I see that an error message is displayed, this causes the test failure. The problem is that the structural equivalence check is not good for this special case. The imported AST contains a class template specialization for A, in this specialization the friend class template A has a previous decl that points to the original friend class template that is in a ClassTemplateDecl. In the specialization the "depth" of template arguments is 0, but in the original template it is 1 (the "to" code at import contains only the "original template", no specialization). This difference in the "depth" causes the type mismatch when the specialization is imported.
AST dump of this code can show the problem:

template<class T, T U>
class A;

template<class T, T U>
class A {
public:
  template<class P, P Q>
  friend class A;

  A(T x):x(x){}
	
private:
  T x;
};

A<int,3> a1(0);

It is really interesting that at friend templates the depth is 1 but friend declarations point to objects outside the class, so really the depth should not increase in a friend template from this point of view. But this is an AST issue.

Aug 5 2023, 9:36 AM · Restricted Project, Restricted Project

Aug 4 2023

jcsxky added a comment to D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

Could you please elaborate in the commit message what exactly the issue currently is and how the patch addresses it?

Aug 4 2023, 3:17 AM · Restricted Project, Restricted Project
jcsxky updated the summary of D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 4 2023, 3:15 AM · Restricted Project, Restricted Project
jcsxky updated the summary of D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 4 2023, 3:14 AM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

add unittest

Aug 4 2023, 12:30 AM · Restricted Project, Restricted Project

Aug 3 2023

jcsxky added reviewers for D156693: [clang][ASTImporter]Skip check depth of friend template parameter: aaron.ballman, rjmccall, martong, vabridgers, aprantl.
Aug 3 2023, 9:09 AM · Restricted Project, Restricted Project

Aug 2 2023

jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

format code

Aug 2 2023, 10:14 PM · Restricted Project, Restricted Project

Aug 1 2023

jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

update patch for passing unittest and test

Aug 1 2023, 8:50 PM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

update patch for passing unittest

Aug 1 2023, 8:20 PM · Restricted Project, Restricted Project
jcsxky retitled D156693: [clang][ASTImporter]Skip check depth of friend template parameter from [clang][ASTImporter]Don't add template decl as in friend decl to [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl.
Aug 1 2023, 6:28 PM · Restricted Project, Restricted Project
jcsxky changed the visibility for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 1 2023, 5:48 PM · Restricted Project, Restricted Project
jcsxky updated the diff for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.

update patch

Aug 1 2023, 5:48 PM · Restricted Project, Restricted Project
jcsxky changed the visibility for D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Aug 1 2023, 1:00 PM · Restricted Project, Restricted Project

Jul 31 2023

jcsxky requested review of D156693: [clang][ASTImporter]Skip check depth of friend template parameter.
Jul 31 2023, 7:15 AM · Restricted Project, Restricted Project

Jul 17 2023

jcsxky requested review of D155537: [ASTImporter] Fix import failed when anonymous union defined in class.
Jul 17 2023, 7:09 PM · Restricted Project, Restricted Project