[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:24 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()) {
----------------
cor3ntin wrote:

```suggestion
    if (!DRE1->getDecl() || !DRE2->getDecl()) {
```

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


More information about the cfe-commits mailing list