[clang-tools-extra] [clang-tidy] Fix false positives about reinitialization detection in `bugprone-use-after-move` (PR #197438)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 15 07:08:28 PDT 2026
================
@@ -132,7 +132,8 @@ makeReinitMatcher(const ValueDecl *MovedVariable,
// operator, test for built-in assignment as well, since
// template functions may be instantiated to use std::move() on
// built-in types.
- binaryOperation(hasOperatorName("="), hasLHS(DeclRefMatcher)),
+ binaryOperation(hasOperatorName("="),
+ hasLHS(ignoringImpCasts(DeclRefMatcher))),
----------------
flovent wrote:
I think you mean `(d) = b`? yes, i change to `ignoringParenImpCasts` now.
https://github.com/llvm/llvm-project/pull/197438
More information about the cfe-commits
mailing list