[clang-tools-extra] [clang-tidy] Improve bugprone.use-after-move interaction with explicit destructor call. (PR #188866)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 3 03:09:24 PDT 2026
================
@@ -401,9 +416,12 @@ void UseAfterMoveFinder::getDeclRefs(
}
};
- auto DeclRefMatcher = declRefExpr(hasDeclaration(equalsNode(MovedVariable)),
- unless(inDecltypeOrTemplateArg()))
- .bind("declref");
+ auto DeclRefMatcher =
+ declRefExpr(hasDeclaration(equalsNode(MovedVariable)),
+ unless(inDecltypeOrTemplateArg()),
+ unless(hasParentIgnoringParenImpCasts(
+ memberExpr(hasDeclaration(cxxDestructorDecl())))))
----------------
serge-sans-paille wrote:
Done!
https://github.com/llvm/llvm-project/pull/188866
More information about the cfe-commits
mailing list