[clang] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 24 23:42:24 PDT 2023
================
@@ -391,7 +405,9 @@ const Stmt *ExprMutationAnalyzer::findMemberMutation(const Expr *Exp) {
match(findAll(expr(anyOf(memberExpr(hasObjectExpression(
canResolveToExpr(equalsNode(Exp)))),
cxxDependentScopeMemberExpr(hasObjectExpression(
- canResolveToExpr(equalsNode(Exp))))))
+ canResolveToExpr(equalsNode(Exp)))),
+ binaryOperator(allOf(hasOperatorName(".*"),
----------------
mzyKi wrote:
```allOf``` is redundant.I think ```binaryOperator(hasOperatorName(".*"),hasLHS(equalsNode(Exp))``` is OK.
https://github.com/llvm/llvm-project/pull/66846
More information about the cfe-commits
mailing list