[clang] [clang-tools-extra] [clang][clang-tidy] Fixes false positive with a non-const method on a pointer (PR #188844)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 5 02:40:18 PDT 2026
================
@@ -404,7 +404,9 @@ ExprMutationAnalyzer::Analyzer::findDirectMutation(const Expr *Exp) {
const auto NonConstMethod = cxxMethodDecl(unless(isConst()));
const auto AsNonConstThis = expr(anyOf(
- cxxMemberCallExpr(on(canResolveToExpr(Exp)), unless(isConstCallee())),
+ cxxMemberCallExpr(
----------------
vbvictor wrote:
Please add MutationAnalyzer tests to cover this
https://github.com/llvm/llvm-project/pull/188844
More information about the cfe-commits
mailing list