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

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 04:34:32 PDT 2023


================
@@ -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 you can make these `const`, and then you won't need the `const_cast`s

https://github.com/llvm/llvm-project/pull/66041


More information about the cfe-commits mailing list