[clang] [clang] fix lack comparison of declRefExpr in ASTStructuralEquivalence (PR #66041)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 12 00:51:23 PDT 2023
================
@@ -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 IsStructurallyEquivalent(Context, DRE1->getDecl()->getDeclName(),
----------------
cor3ntin wrote:
Shouldn't that simply be `IsStructurallyEquivalent(DRE1->getDecl(), DRE2->getDecl())` ?
https://github.com/llvm/llvm-project/pull/66041
More information about the cfe-commits
mailing list