[PATCH] D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt

2023-09-19 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. ping~ @donat.nagy @steakhal @balazske Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159519/new/ https://reviews.llvm.org/D159519 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D159519: [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt

2023-09-15 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 556861. jcsxky added a comment. update according to llvm convention. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159519/new/ https://reviews.llvm.org/D159519 Files: clang/lib/AST/ASTStructuralEquivalence.cp

[PATCH] D159519: [clang][ASTImport] improve ast comparation

2023-09-14 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky created this revision. jcsxky added reviewers: donat.nagy, steakhal, balazske. jcsxky added projects: clang, clang-c. Herald added subscribers: ChuanqiXu, martong. Herald added a project: All. jcsxky requested review of this revision. Herald added a subscriber: cfe-commits. 1. VarDecl shoul

[PATCH] D159479: [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation

2023-09-07 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D159479#4640590 , @donat.nagy wrote: > Today we learned that truth is different from falsehood... > > LGTM, nice catch! Thanks for your quick review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D159479: [ASTImport]CXXBoolLiteralExpr should be handled explicitly in statement comparation

2023-09-07 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D159479#4640607 , @steakhal wrote: > Make sure the commit message complies with the guidelines. Fix title and summary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159479/new/

[PATCH] D159479: [ASTImport]enhance statement comparing

2023-09-07 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky created this revision. jcsxky added projects: clang, clang-c. Herald added a subscriber: martong. Herald added a project: All. jcsxky requested review of this revision. Herald added a subscriber: cfe-commits. Return statement comparing should consider return value. Repository: rG LLVM G

[PATCH] D159412: [analyzer]FieldRegion in getStaticSize should return size of pointee type

2023-09-04 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D159412#4636813 , @donat.nagy wrote: > 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. Thanks for your advice. We use this api i

[PATCH] D159412: [analyzer]FieldRegion in getStaticSize should return size of pointee type

2023-09-03 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky created this revision. jcsxky added reviewers: steakhal, balazske, aaron.ballman, NoQ. jcsxky added projects: clang, clang-c. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald add

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-21 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:140 +D0->getASTContext(), D1->getASTContext(), NonEquivalentDecls01, +StructuralEquivalenceKind::Default, false, false, false, +IgnoreTemplateParmDepth); --

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-21 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 552179. jcsxky added a comment. add argument comment according to bugprone-argument-comment . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-21 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D156693#4603537 , @balazske wrote: > 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 whe

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-18 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D156693#4584657 , @balazske wrote: > 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 improve

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-15 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 550352. jcsxky added a comment. Fix variable names according to the convention. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files: clang/include/clang/AST/ASTStr

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-15 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 550214. jcsxky added a comment. Add testcase to illustrate the difference between `TemplateTypeParm` and `NonTypeTemplateParm` in detecting by structural equivalence. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-15 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1709 + classTemplateDecl(hasName("A"))); + EXPECT_TRUE(testStructuralMatch(t)); + EXPECT_TRUE(testStructuralMatch(t, true)); balazske wrote: > The intent was to hav

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-15 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 550208. jcsxky added a comment. Add more simple testcase to StructuralEquivalenceTest.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files: clang/include/clang

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-14 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:5831 +FoundTemplate->getFriendObjectKind() != Decl::FOK_None && +!D->specializations().empty(); +if (IsStructuralMatch(D, FoundTemplate, true, IgnoreDepth)) {

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-14 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 550030. jcsxky added a comment. fixed according to the review and add testcase to StructuralEquivalenceTest.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files:

[PATCH] D156693: [clang][ASTImporter]Skip check friend template depth

2023-08-08 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D156693#4568941 , @balazske wrote: > 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 `ClassTemplateSpeci

[PATCH] D156693: [clang][ASTImporter]Skip check friend template depth

2023-08-08 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 548166. jcsxky edited the summary of this revision. jcsxky added a comment. 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 Repos

[PATCH] D156693: [clang][ASTImporter]Skip check friend template depth

2023-08-05 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 547505. jcsxky added a comment. clean unittest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files: clang/include/clang/AST/ASTStructuralEquivalence.h clang/lib/

[PATCH] D156693: [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl

2023-08-05 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 547501. jcsxky edited the summary of this revision. jcsxky added a comment. update diff: ignore compare depth in friend class template Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.ll

[PATCH] D156693: [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl

2023-08-05 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D156693#4560110 , @balazske wrote: > 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 str

[PATCH] D157170: [clang][AST]Don't increase depth in friend tempalte class declaration

2023-08-04 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky created this revision. jcsxky added reviewers: a.sidorin, shafik, balazske, steakhal, aaron.ballman, Michael137. jcsxky added projects: clang, clang-c. Herald added a project: All. jcsxky requested review of this revision. Herald added a subscriber: cfe-commits. Don't increase template par

[PATCH] D156693: [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl

2023-08-04 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D156693#4560023 , @Michael137 wrote: > Could you please elaborate in the commit message what exactly the issue > currently is and how the patch addresses it? In D156693#4560023 , @M

[PATCH] D156693: [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl

2023-08-04 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 547124. jcsxky added a comment. add unittest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files: clang/lib/AST/ASTImporter.cpp clang/test/Analysis/Inputs/ctu-fr

[PATCH] D156693: [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl

2023-08-02 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 546698. jcsxky added a comment. format code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files: clang/lib/AST/ASTImporter.cpp clang/test/Analysis/Inputs/ctu-fri

[PATCH] D156693: [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl

2023-08-01 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 546309. jcsxky added a comment. update patch for pass unittests and test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files: clang/lib/AST/ASTImporter.cpp clang

[PATCH] D156693: [clang][ASTImporter]Skip check friend template declaration in VisitClassTemplateDecl

2023-08-01 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky updated this revision to Diff 546301. jcsxky added a comment. update patch for pass unittests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156693/new/ https://reviews.llvm.org/D156693 Files: clang/lib/AST/ASTImporter.cpp clang/test/Ana

[PATCH] D156693: [clang][ASTImporter]Don't add template decl as in friend decl

2023-07-31 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky created this revision. jcsxky added reviewers: a.sidorin, shafik, balazske, steakhal. jcsxky added a project: clang. Herald added a subscriber: martong. Herald added a project: All. jcsxky requested review of this revision. Herald added subscribers: cfe-commits, wangpc. There is no need to

[PATCH] D155537: [ASTImporter] Fix import failed when anonymous union defined in class

2023-07-17 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky created this revision. jcsxky added a reviewer: danix800. jcsxky added a project: clang. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. jcsxky requested review of this revision. Herald added a subscriber: