================
@@ -810,9 +810,10 @@ void FactsGenerator::handleInvalidatingCall(const Expr
*Call,
if (!isInvalidationMethod(*MD))
return;
- // Heuristics to turn-down false positives.
- auto *DRE = dyn_cast<DeclRefExpr>(Args[0]);
- if (!DRE || DRE->getDecl()->getType()->isReferenceType())
+ // Heuristics to turn-down false positives. Skip member field expressions for
+ // now. This is not a perfect filter and will still surface some false
+ // positives (e.g. `auto& r = s.v`).
+ if (!isa<DeclRefExpr>(Args[0]->IgnoreParenImpCasts()))
----------------
zeyi2 wrote:
This is from the reverted PR: https://github.com/llvm/llvm-project/pull/195231
These are technically two separate changes. But to support the new field/global
diagnostics, we need to make that heuristic slightly less conservative first,
so I merged these two PRs.
https://github.com/llvm/llvm-project/pull/196680
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits