================
@@ -401,9 +401,12 @@ void UseAfterMoveFinder::getDeclRefs(
       }
     };
 
-    auto DeclRefMatcher = 
declRefExpr(hasDeclaration(equalsNode(MovedVariable)),
-                                      unless(inDecltypeOrTemplateArg()))
-                              .bind("declref");
+    auto DeclRefMatcher =
+        declRefExpr(
+            hasDeclaration(equalsNode(MovedVariable)),
+            unless(inDecltypeOrTemplateArg()),
+            unless(hasParent(memberExpr(hasDeclaration(cxxDestructorDecl())))))
----------------
zeyi2 wrote:

Currently it will fail to ignore cases like:

```cpp
#include <utility>

struct T {
    ~T() {}
};

void test_intended_change() {
    T a;
    T a2 = std::move(a);
    (a).~T(); 
}
```

Maybe `ignoringParenImpCasts`?

https://github.com/llvm/llvm-project/pull/188866
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to