[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread via cfe-commits
https://github.com/mzyKi resolved https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread via cfe-commits
https://github.com/mzyKi resolved https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/66041 >From a1635d87e4b56b501403f1add333c97b96b30a0f Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Tue, 12 Sep 2023 10:51:35 +0800 Subject: [PATCH] [clang][AST] fix lack comparison of declRefExpr in

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/66041 >From f74271d018d413832290e9d021ad6f25209a35fd Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Tue, 12 Sep 2023 10:51:35 +0800 Subject: [PATCH] [clang][AST] fix lack comparison of declRefExpr in

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread Ding Fei via cfe-commits
@@ -2320,5 +2320,14 @@ TEST_F(StructuralEquivalenceStmtTest, UnresolvedLookup) { EXPECT_TRUE(testStructuralMatch(t)); } +TEST_F(StructuralEquivalenceStmtTest, DeclRefENoEq) { danix800 wrote: ```suggestion TEST_F(StructuralEquivalenceStmtTest, DeclRefExpr)

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread Ding Fei via cfe-commits
@@ -218,6 +218,8 @@ Bug Fixes in This Version (`#65156 `_) - Clang no longer considers the loss of ``__unaligned`` qualifier from objects as an invalid conversion during method function overload resolution. +- Fix lack of

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/66041 >From 011c3997ac72918b23db511b94184e9fc5351a54 Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Tue, 12 Sep 2023 10:51:35 +0800 Subject: [PATCH] [clang] fix lack comparison of declRefExpr in

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-15 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/66041 >From c6022432afb24b4788e6d5065f583b29a1a5277a Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Tue, 12 Sep 2023 10:51:35 +0800 Subject: [PATCH] [clang] fix lack comparison of declRefExpr in

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-13 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/66041: >From fd7138ee568d0a46a71a7f4e268ecd491e600b31 Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Tue, 12 Sep 2023 10:51:35 +0800 Subject: [PATCH] [clang] fix lack comparison of declRefExpr in

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-13 Thread via cfe-commits
https://github.com/mzyKi resolved https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-13 Thread via cfe-commits
@@ -214,6 +214,16 @@ class StmtComparer { return E1->size() == E2->size(); } + bool IsStmtEquivalent(const DeclRefExpr *DRE1, const DeclRefExpr *DRE2) { +auto *Decl1 = DRE1->getDecl(); +auto *Decl2 = DRE2->getDecl(); mzyKi wrote: ```cpp ///

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-13 Thread via cfe-commits
https://github.com/mzyKi resolved https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
@@ -214,6 +214,16 @@ class StmtComparer { return E1->size() == E2->size(); } + bool IsStmtEquivalent(const DeclRefExpr *DRE1, const DeclRefExpr *DRE2) { +auto *Decl1 = DRE1->getDecl(); +auto *Decl2 = DRE2->getDecl(); cor3ntin wrote: actually

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/mzyKi resolved https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/mzyKi review_requested https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/66041: >From 0ddd5dbb2e2a9097e762334a0d903e4043721cc2 Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Tue, 12 Sep 2023 10:51:35 +0800 Subject: [PATCH] [clang] fix lack comparison of declRefExpr in

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/mzyKi edited https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/mzyKi edited https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/mzyKi edited https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
@@ -214,6 +214,14 @@ class StmtComparer { return E1->size() == E2->size(); } + bool IsStmtEquivalent(const DeclRefExpr *DRE1, const DeclRefExpr *DRE2) { +if (nullptr == DRE1->getDecl() || nullptr == DRE2->getDecl()) { + return false; +} +return

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
cor3ntin wrote: You should edit `clang/docs/ReleaseNotes.rst`, indicating that https://github.com/llvm/llvm-project/issues/66047 was fixed, and edit the description of the PR with `Fixes #66047` so that it gets closed automatically. Otherwise LGTM

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/66041: >From 18039e20fd8bbc97373eaec3f788eeb4e4b53194 Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Tue, 12 Sep 2023 10:51:35 +0800 Subject: [PATCH] [clang] fix lack comparison of declRefExpr in

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
@@ -214,6 +214,14 @@ class StmtComparer { return E1->size() == E2->size(); } + bool IsStmtEquivalent(const DeclRefExpr *DRE1, const DeclRefExpr *DRE2) { +if (nullptr == DRE1->getDecl() || nullptr == DRE2->getDecl()) { cor3ntin wrote: ```suggestion

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. Thanks for working on that! Can you explain why you are comparing declaration only with their name? that seems suspicious to me. Otherwise, I think the intent of the change is correct

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
@@ -214,6 +214,14 @@ class StmtComparer { return E1->size() == E2->size(); } + bool IsStmtEquivalent(const DeclRefExpr *DRE1, const DeclRefExpr *DRE2) { +if (nullptr == DRE1->getDecl() || nullptr == DRE2->getDecl()) { + return false; +} +return

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-12 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-11 Thread via cfe-commits
https://github.com/mzyKi edited https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-11 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-11 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-11 Thread via cfe-commits
https://github.com/mzyKi created https://github.com/llvm/llvm-project/pull/66041: Before fix,the following testcase expected true. While I think only comparison of declName is not sufficient.Thanks for giving suggestions. >From 1efbe57a8acd2219228014dd7dce6f179ee777c7 Mon Sep 17 00:00:00 2001

[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)

2023-09-11 Thread via cfe-commits
https://github.com/mzyKi review_requested https://github.com/llvm/llvm-project/pull/66041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits