[clang] [LifetimeSafety] Detect iterator invalidation through container aliases (PR #195231)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 04:47:04 PDT 2026
================
@@ -773,9 +773,10 @@ void FactsGenerator::handleInvalidatingCall(const Expr *Call,
if (!isContainerInvalidationMethod(*MD))
return;
- // Heuristics to turn-down false positives.
- auto *DRE = dyn_cast<DeclRefExpr>(Args[0]);
- if (!DRE || DRE->getDecl()->getType()->isReferenceType())
+
+ // Skip member field expressions for now. This is not a perfect filter and
----------------
usx95 wrote:
Let us also explicitly say that "// Heuristics to turn-down false positives." at the start to clarify the intention.
https://github.com/llvm/llvm-project/pull/195231
More information about the cfe-commits
mailing list